Download the PHP package pieceofcake2/image without Composer
On this page you can find all versions of the php package pieceofcake2/image. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download pieceofcake2/image
More information about pieceofcake2/image
Files in pieceofcake2/image
Package image
Short Description CakePHP 2 plugin that validates uploaded images by their contents: JPEG, PNG, GIF, WebP and strictly allowlisted SVG
License MIT
Informations about the package image
CakePHP 2 Image Plugin
A plugin for pieceofcake2/cakephp applications that validates uploaded images by their contents: the type (JPEG, PNG, GIF, WebP and SVG) and the size, and the extension to give the saved file. SVG documents are accepted only if they contain nothing but static graphics, with a strict allowlist: no scripts, event handlers, external references, animations or XML entities.
Documentation
- Website: https://pieceofcake2.github.io/image/ (日本語: https://pieceofcake2.github.io/image/ja/)
- Markdown: docs/ja/README.md) (for AI tools and offline reading)
It covers the validation rules, the settings, what SVG documents are accepted and how to serve uploaded SVG files safely.
The Markdown documentation is also included in the Composer package, in the plugin's directory: plugins/Image/docs/README.md (the location depends on your installer-paths).
Requirements
- PHP 8.0+ with the
domandlibxmlextensions - pieceofcake2/cakephp 2.12+
Installation
Load the plugin in config/bootstrap.php (legacy layout: app/Config/bootstrap.php):
See Installation for the installer-paths setting.
Usage
Save the file with the extension of its contents ($this->Hotel->imageExtension($file['tmp_name'])),
and serve uploaded SVG files with a restrictive Content-Security-Policy. See
Validation Rules and
Serving Uploaded SVG Files.
Contributing
See the contribution guidelines.
License
Licensed under the MIT License. See LICENSE.
All versions of image with dependencies
ext-dom Version *
ext-libxml Version *
composer/installers Version ^1.0 || ^2.0
pieceofcake2/cakephp Version ^2.12