![]() |
|
jsThumbnailPlugin - 1.1.0The jsThumbnailPlugin is a symfony plugin that creates Thumbnails on the fly using the GD library. |
|
The plugin provides Creates Thumbnails on the fly using GD for the symfony php framework. It uses the Symfony cache system to cache the thumbnails. It creates a thumbnail of a image in the given size and stores it in cache for the next calls, until the image changes.
For the full copyright and license information, please view the LICENSE file that was distributed with this source code.
To install the plugin use symfony plugin-install command
symfony plugin-install http://plugins.symfony-project.com/jsTumbnailPlugin
Enable one or more modules in your settings.yml * jsThumbnail
all:
.settings:
enabled_modules: [jsThumbnail ]( default,)
In your template call something like this:
'border: 1px solid #ff0000')) ?>
//'/path/to/image.jpg',maximum width, maximum height, params
The Parameter "mode" can be "normal", "crop" or "stretch" you can call the Thumbnail directly: www.yourhost.com/yourapp.php/jsThumbnail/thumbnail?img=uploads/pictures/image.jpg&maxx=100&maxy=80&mode=crop
<?php use_helper('Thumbnail') ?>
<?php echo thumbnail_tag('uploads/pictures/offer/54fbcc52d9ec1af3decd50aeed9f5517.jpg',100, 80, 'stretch' array('style' => 'border: 1px solid #ff0000')) ?>
The Plugin automatically checks if the Original image was modificated. To delete the cached thumbnails call:
symfony cc