Download the PHP package nelson/resizer without Composer
On this page you can find all versions of the php package nelson/resizer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download nelson/resizer
More information about nelson/resizer
Files in nelson/resizer
Download nelson/resizer
More information about nelson/resizer
Files in nelson/resizer
Vendor nelson
Package resizer
Short Description Resizer Extension for Nette Framework & Latte
License
Package resizer
Short Description Resizer Extension for Nette Framework & Latte
License
Please rate this library. Is it a good library?
Informations about the package resizer
Installation
- Composer:
composer require nelson/resizer -
Register:
-
Config:
This is the bare minimum required:
Other options with their defaults:
There is also an upgrade/downgrade logic for AVIF & WEBP. Most preferred is the original AVIF/WEBP, then each other, finally JPEG.
AVIF is preferred over WEBP in case both upgrades are enabled.
Usage
Order of parameters is dependant on the router, the default is:
- Dimensions & modifiers.
string - Image file.
string - Format.
string
Dimensions & modifiers
Syntax:
[ifresize-][[cropX]width]x[[cropY]height][forceDimensions][-quality]
Dimensions:
100x100- width and height must be equal or less, resized according to AR.x100- height must be equal or less.100x- width must be equal or less.100x50!- dimensions are forced without respecting ifresize and AR.- Cropping:
- width:
l- left,c- center,r- right. - height:
t- top,c- center,b- bottom. - Example:
c100xc100
- width:
Modifiers:
ifresize- Example:
ifresize-100x200 - If the image is smaller than the desired width and/or height, image will not be enlarged.
- Example:
- Quality
- Example:
x-q50- sets just the quality without any resize. - For WEBP/AVIF quality set to
100means lossless compression.
- Example:
Format:
- The format parameter can be used to switch between image file formats, e.g.
<source srcset="">in<picture>tag for converting jpegs to WEBP/AVIF.
Relative and absolute URLs
Relative:
<img src="{rlink 'test.jpg', '200x100'}">
Absolute, uses diffent tag:
<img src="{rlinkabs 'test.jpg', 'l400xc200'}"><a href="{rlinkabs 'test.jpg', 'l400xc200'}" target="_blank">Link to image</a>
All versions of resizer with dependencies
PHP Build Version
Package Version
Requires
php Version
^8.1
ext-fileinfo Version *
latte/latte Version ^2.11.0 || ^3.0.0
nette/application Version ^3.1
nette/di Version ^3.0
nette/http Version ^3.1
nette/schema Version ^1.0
nette/utils Version ^3.2 || ^4.0
imagine/imagine Version ^1.3.3
ext-fileinfo Version *
latte/latte Version ^2.11.0 || ^3.0.0
nette/application Version ^3.1
nette/di Version ^3.0
nette/http Version ^3.1
nette/schema Version ^1.0
nette/utils Version ^3.2 || ^4.0
imagine/imagine Version ^1.3.3
The package nelson/resizer contains the following files
Loading the files please wait ...