Skip to content

Image resizing and compression

Topol provides handy opt-in compression and resizing options.


This feature has an effect when using our built-in storage as well as Custom Storage integration (GCS or S3) and self-hosted option.


When using custom file manager this feature has no effect.

Auto resize images

Will auto resize images for the 2x width size the Template (for Retina compatibility).

Standard template width is 600px, so the default image size is 1200px, height is calculated automatically based on the image aspect ratio.

You can enable this feature as follows:

imageCompressionOptions: {
    enableAutoResize: true,

Image compression

Will automatically compress images. Default setting is 95% for JPEG and 80% for PNG.

You can set custom compression for JPEG and PNG file types.

imageCompressionOptions: {
    enableCompression: true,
    qualityJpeg: 0.95 // 95 % compression
    qualityPng: 0.8 // 80 % compression