Download the PHP package owja/image-proxy-bundle without Composer
On this page you can find all versions of the php package owja/image-proxy-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download owja/image-proxy-bundle
More information about owja/image-proxy-bundle
Files in owja/image-proxy-bundle
Package image-proxy-bundle
Short Description Base Bundle for OWJA! Image Proxy
License MIT
Informations about the package image-proxy-bundle
OWJA! Image Proxy Bundle
This Bundle is Open Source and under MIT license.
With this Bundle you can add some Image Resizing and Optimization Functionality to your Symfony Project. After Setup and Configuration you can access the Images on the same, or one or more other Servers, trough this Installation.
Accessing the images
Preset Mode
enable_presets
must be set to true
to use this. Default is true
.
http://.../:`preset`/`imagepath`
Var | Value | Required | Info |
---|---|---|---|
preset | string | yes | The preset code |
imagepath | string | yes | The public path to the Image |
Example to get image "img/someimage.jpg" processed by preset "fullhd":
Dynamic Mode
enable_dynamic
must be set to true
to use this. Default is false
.
IMPORTANT! Dynamic mode should not used in production environment!
http://.../`type`/`height`x`width`/`imagepath`
Var | Value | Required | Info |
---|---|---|---|
type | resize or crop | yes | Resize will first resize the image to best fit and then crop to destination size. |
height | integer | no | Destination height of Image |
width | integer | no | Destination width of Image |
imagepath | string | yes | The public path to the Image |
Examples
Resize and crop the Image to fit into a 100x100 Pixel square
Cropping to fit into a 100x100 Pixel square
Resize to 100 Pixel with and preserve original image Ratio
Resize to 100 Pixel height and preserve original image Ratio
Optimizations only:
Installation
Load Bundles in app/AppKernel.php
Setup your app/config/config.yml
Set "http://example.com/" to the URL representing the source of your images.
Setup your app/config/routing.yml
Create the Directory for temporary Files which gets created while processing the Images:
Configuration Details
CVar | Default | Info |
---|---|---|
remote : token | null | Send by Header 'owja-image-proxy' |
remote : timeout | 10 | Request timeout to get the source image |
limits : height | 1080 | Maximum allowed height of requested Image |
limits : width | 1920 | Maximum allowed width of requested Image |
temp_dir | "%kernel.root_dir%/../var/temp/" | Temporary directory for image processing |
cache_service | "owja_image_proxy.cache" | The name of the cache filesystem (oneup_flysystem) |
optimization | true | Enable/disable image optimization |
default_site | "default" | Code of the default site. Has to be configured under sites |
enable_sites | false | Set to true to enable more than the default site |
enable_dynamic | false | Set to true to enable dynamic mode |
enable_presets | true | Set to true to enable processing predefined presets |
Multiple Sites
Simply add some sites and set enable_sites to true
Accessing the images by sites
Same as explained above ("Accessing the images"), but with site parameter
Dynamic Mode
http://.../`site`/`type`/`width`x`height`/`imagepath`
Preset Mode
http://.../`site`:`preset`/`imagepath`
Presets Configuration
Global Presets:
Per Site Presets:
Image Optimization
To enable image optimization you should install some optimizers.
If you have installed some optimizers but want to disable optimization you can do this at app/config/config.yml
Reporting & Collaboration
Issues and feature requests are tracked in this Github Issue Tracker. Pull Requests to enhance the code to add features or to fix bugs are very welcome. ;-)
License
This bundle is under the MIT license.
All versions of image-proxy-bundle with dependencies
symfony/framework-bundle Version ^3.0
oneup/flysystem-bundle Version ^1.14
guzzlehttp/guzzle Version ^6.0
ps/image-optimizer Version ^1.1
owja/php-helper Version ^1.0