|image_reduire

The filter |image_reduire{largeur,hauteur} allows to resize an image to a given size while keeping the proportion of the image.

It is possible to have a parameter largeur or hauteur equal to zero. In this case, only the other parameter is taken into account.

If the image provided is smaller than the settings, nothing happens (the image is not reduced).

Let’s take an image 300x400 pixels

Example 1: Reduce an image with a maximum of 80 pixels in width and 200 pixels in height

[(#FICHIER|image_reduire{80,200})]

The resulting image is 80x107 pixels.

Example 2: Reducing an image to 200 pixels in height

[(#FICHIER|image_reduire{0,200})]

The resulting image is 150x200 pixels

Example 3: Indicate a dimension larger than the image

[(#FICHIER|image_reduire{500,0})]

Calculates a thumbnail but does not enlarge the image. The resulting image is 300x400 pixels

See also

The filters

The article on the Automatic image processing, also detailing many other image filters.

Author jack Published : Updated : 23/07/23

Translations : English, Español, français, Nederlands