guideEasy Image - service details

This article explains how Easy Image works internally and is geared towards more advanced users. For a high-level description of the service, check the Easy Image overview article. To enable Easy Image in your editor, follow the Quick start guide.

# Image processing

For every uploaded image, Easy Image produces several optimized versions of the same image.

Image sizes are calculated in two ways depending on the width of the original image:

  • For large images (wider than 800px) the width is reduced every 10%.
  • For small images the width is reduced every 80px until the 100px limit is reached.

The original image gets saved in the cloud, too.

Thanks to offering several versions of the same image, devices with smaller resolutions, such as mobile devices, may request images that fit their display, reducing the bandwidth and improving the loading time of a website.

# Examples

For a 4000px wide image the following versions of it will be created: 400px, 800px, 1200px, 1600px, 2000px, 2400px, 2800px, 3200px, 3600px and 4000px.

For a 500px wide image the following versions will be created: 100px, 180px, 260px, 340px, 420px and 500px.

# Upload response

The Easy Image service responds with a JSON object containing addresses of generated versions of the image. The keys indicate the width of the image, the original image is named default. By default the aspect ratio is preserved.

# Sample response


The entire communication is hidden from the developer and requires no effort on their part.

# Generated HTML markup

The markup used for images varies a bit depending on the editor version, however, the <img> element always contains a similar srcset attribute where all the generated versions of the image are listed:

<figure ...>
    <figcaption ...>...</figcaption>
    <img alt="..." src="" width="3840"
    srcset=" 390w, 780w, 1170w, 1560w, 1950w, 2340w, 2730w, 3120w, 3510w, 3840w" sizes="100vw">

You can find more information about srcset and responsive images in the Responsive images article on MDN.

# Requesting a different size of the image

The Easy Image service supports requesting any size of an image.

# Parameters

To request an image with a custom size, add parameters to the default URL. Parameters are separated by commas. The names of parameters and values should be separated by an underscore, for example w_300,h_100.

Abbreviated names of parameters must be used, see the table below:

Abbreviated name Full name
w width
h height

When w and h are used together, aspect ratio is ignored and a stretched image will be returned.

# Example

A sample default image URL:

The same image resized to 200x100px:,h_100

# Supported file formats

Easy Image supports the following formats:

  • png
  • jpeg
  • bmp (images in bmp will be converted to png)
  • tiff
  • webp
  • gif (animated gifs are also supported)