You can change the compression (output format and quality) of your image by using compression filters. You can use the compression filters alongside and .
By default, Filerobot delivers the images as WebP. If the format is not supported by the client browser, it falls back to JPEG or PNG. If you wish to keep the original format, you can use force_format=original.
You can of course force a specific output format(s). More details can be found in the image formats section.
Supported output image formats
The JPEG compression format is suitable for delivering photographic images with minimal quality loss and high compression rate. You can either choose the compression factor yourself or use Optipress - our Machine Learning based algorithm, which will choose the best way to reduce JPEG file size minimising perceptual quality loss.
Preview | Syntax |
---|---|
This format is a good choice for non-photographic images - flowcharts, graphs, screenshots, logos, etc. PNG also supports transparency.
While the PNG format offers lossy compression only, Filerobot can optimize the image before compression by reducing the number of colors or adding slight dithering (while preserving edges). This method usually leads to smaller file sizes for images visually indistinguishable from the original ones.
You can activate this feature in the Asset Hub (Settings/Process/Images/Image compression):
WebP is an image format maintained by Google and supported in certain browsers (mainly Chrome, Opera and on Chrome Android) which provides more aggressive compression techniques as JPG without noticeable quality degradation.
By default, automatic WebP transcoding is deactivated. If you choose to activate it, all images will be delivered as WebP. If the client's browser does not support this format, JPEG or PNG (if image has alpha channel) is used instead.
You can use the following parameters to control webp compression quality:
By default, Filerobot delivers the images as WebP, when the format is supported by the browser. If you would like to keep the format of the original image (when possible), you can use force_format=original.
Machine learning based image compression
Different images compressed with the same compression parameters may result in different perceptive quality. Moreover, the same image in different sizes may require different compression strategy to achieve maximum size gain without visible quality loss.
To overcome this, you can use our Optipress JPEG compression algorithm.
Optipress finds out the best JPG compression approach by analysing specific image features and current compression parameters.
A Machine Learning model determines the best compression strategy for this image.
Quality is then evaluated based on a simulation model of the Human Visual System to achieve optimum compression without perceptive quality deterioration.
By using Optipress, you can get the most of the JPEG compression format.
Optipress achieves best results when re-compressing JPEG files and when the image quiality is crucial.
Images created by Optipress fully comply with baseline JPEG specifications and are compatible with all JPEG encoders.
Preview | Syntax |
---|---|
Preview | Syntax |
---|---|
Preview | Syntax |
---|---|
Set format
force_format=webp
forces using the JPEG image compression
Quality
q=X
X=0..100
the smaller the value of q, the more your image will be compressed. Be careful - the quality of the image will decrease as well.
Lossless
lossless=1
use lossless webp compression
Set format
force_format=jpg
forces using the JPEG image compression
Quality
q=X
X=0..100
the smaller the value of q, the more your image will be compressed. Be careful - the quality of the image will decrease as well.
Optipress
optipress=X
X=1..3
chooses the best compression approach maintaining visual quality via the Optipress algorithm
q=85, filesize 204 kB: /docs/woman_dress.jpg?force_format=jpeg&q=85 q=75, filesize 129 kB: /docs/woman_dress.jpg?force_format=jpeg&q=75 q=65, filesize 102 kB: /docs/woman_dress.jpg?force_format=jpeg&q=65
Set format
force_format=png
forces using the PNG image compression
A modern format suitable for most images. Supports trasnparency and offers both lossy and lossless compression.
The most popular and widely-supported format. Used by digital cameras. Suitable for photographic images. Lossy compression only.
Image format with transperency support suitable for raster logos, charts, infographs, etc. Lossless compresison only.
optipress=1
most conservative setting; image quality is prioritised
optipress=2
balanced setting
optipress=3
most aggressive setting; optimised for smaller file size
q=85, 543 kB: /docs/paris.jpg?force_format=jpeg&q=85 optipress=3, 347 kB: /docs/paris.jpg?force_format=jpeg&optipress=3
q=85, 246 kB: /docs/boat.jpg?force_format=jpeg&q=85 optipress=3, 150 kB: /docs/boat.jpg?force_format=jpeg&optipress=3