Download the PHP package just/thumbnailbundle without Composer

On this page you can find all versions of the php package just/thumbnailbundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package thumbnailbundle

Just/ThumbnailBundle - Symfony2/3/4 Bundle for on-the-fly Thumbnails Creation

Overview

This is a bundle for the Symfony2, Symfony3 and Symfony4 framework that creates Thumbnails on first demand. The thumbnails then are stored using the Symfony cache system. It creates a thumbnail of a image in the given size and stores it in cache for the next calls, until the image changes. The bundle has a new face-detection feature to avoid cut off of faces.

SensioLabsInsight

License

This bundle is released under the MIT license

Installation

Step1: Using Composer

Add the following line to your composer.json require block:

Then, you can install the new dependencies by running Composer's update command from the directory where your composer.json file is located:

Step 2: Register the Bundle

Modify your AppKernel with the following line:

Step 3: Configure the bundle

All parameters are optional. The default imagesrootdir is the Symfony web-directory. The placeholder-Image will be showen if the original image is not readable or not found. If the placeholder parameter is not set then the Controller will return a "404 Not found" message. "expiretime" is maximum age of a thumbnail in cache in seconds. After this time the thumbnail will be regenerated. Default value is 86400 (one day).

The thumbnail is stored in cache by a key that is generated using the image-name, the maxx-parameter, the maxy-parameter, the mode-parameter and the creationtime. If one of those parameters changes than the thumbnail will be regenerated.

If not already done, you have to define a cache service

Note:

The JustThumbnailBundle needs to have gd.jpeg_ignore_warning set to "1". Set gd.jpeg_ignore_warning to "1" in your php.ini, and restart your webserver.

Step 4: Import JustThumbnailBundle routing file

In YAML:

Or if you prefer XML:

Usage:

The thumbnail will be generated just in time when the url is called:

Parameter "mode"

This parameter can be set to "normal", "crop", "stretch" and "max".

Parameter maxx and maxy

"maxx" is the maximum width and "maxy" the maximun height of the generated thumbnail.

Placeholder

You can overwrite the placeholder-file-config by adding a "placeholder"-Parameter to the url. Example: www.yourdomain.tld/thumbnails/stretch/800x225/path/to/image?placeholder=new_placeholder_image.jpg

Parameter "center"

This parameter can be set to "", "auto", or "[int],[int]". Default is "". This parameter can be used to define a center point of a image that should be always visible in crop mode. This is to avoid that highlights of the image are cut off. If set to "auto", the script will try to detect a face in the image. If found, the center will be set to the center of the detected face. So the face should not be cut off.

Twig Helper

You can use the twig helper to generate the URL :

will generate something like:

knpbundles.com


All versions of thumbnailbundle with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4 || ^7.0 || ^8.0
symfony/framework-bundle Version ^2.3 || ^3.4.26 || ^4.1.12 || ^5.0 || ^6.0
symfony/cache Version ~2.4 || ~3.4 || ~4.0 || ~5.0 || ^5.0 || ^6.0
mauricesvay/php-facedetection Version ~0.1
ext-gd Version *
ext-fileinfo Version *
ext-simplexml Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package just/thumbnailbundle contains the following files

Loading the files please wait ....