Tinify
Comment pouvons-nous vous aider ?Découvrez comment configurer votre CDN et comment utiliser ses fonctionnalités.

Redimensionnement des images

Le CDN Tinify peut redimensionner vos images à la volée. Il est notamment possible de redimensionner les images pour créer des versions plus petites, telles que des vignettes.

Exemple

La taille des images peut être modifiée à l'aide de paramètres de chaîne de requête dans l'URL de l'image. Ce qui suit réduira l'image panda.png à une largeur de 100 pixels, en ajustant la hauteur en conséquence.

https://xxxxxxxx.tinifycdn.com/panda.png?resize.width=100

Plusieurs paramètres de chaîne de requête peuvent être combinés :

https://xxxxxxxx.tinifycdn.com/panda.png?resize.width=100&resize.height=50&resize.method=fit

Options de redimensionnement

Le paramètre resize.method décrit la manière dont votre image sera redimensionnée. Les méthodes suivantes sont disponibles.

resize.method=scale
Scales the image down proportionally. You must provide either a target resize.width or a target resize.height parameter, but not both. The scaled image will have exactly the provided width or height.
resize.method=fit
Scales the image down proportionally so that it fits within the given dimensions. You must provide both a resize.width and resize.height parameter. The scaled image will not exceed either of these dimensions.
resize.method=cover
Scales the image proportionally and crops it if necessary so that the result has exactly the given dimensions. You must provide both a resize.width and resize.height parameter. The parts of the image that are cropped away are determined automatically. An intelligent algorithm determines the most important areas of your image.
resize.method=thumb
A more advanced implementation of cover that also detects cut-out images with plain backgrounds. The image is scaled down to the resize.width and resize.height you provide. If an image is detected with a free-standing object it will add more background space where necessary or crop the unimportant parts.

We have guides and video instructions available for many popular platforms (content management systems and web frameworks). More are coming!