Skip to main content

Format an Image

Once you have some images uploaded, you can retrieve the image back from your browser and see how you can optimize and resize the image on the fly.

Get Original Image

Your images are accessed on the URL https://images-<customer domain>.evolvestorefront.com or if your subscription allows for it, on your custom domain. The path to the image is in the same directory structure as you uploaded your images.

Test in your browser by typing in an URL to your image. For example: https://images-example.evolvestorefront.com/products/couch.jpg

https://images-example.evolvestorefront.com/products/couch.jpg

Couch - original

The image returned will have the same dimensions, file size and format as the original, source image.

Convert File Format

Source image formats can be converted to another format depending on your needs. The output format is controlled by the format parameter and it can be one the following possible values: jpeg, png, avif, webp, tiff, gif, auto.

If auto is used, the system will try to detect whether or not the browser first supports AVIF, then WebP. If neither are supported, JPEG will be used.

https://images-example.evolvestorefront.com/products/couch.jpg?format=avif

Couch - AVIF

The image returned will have the same dimensions as the original, source image, but the image format specified.

Resize Image

An image can be resized by using the width and height parameters.

  1. If neither values are provided, the output image dimensions will be the same as the source image
  2. If either value is provided, the aspect ratio of the source image will be used to calculate the missing value
  3. If both values are provided, the output image will use the aspect ratio of the source image, cropping the image if needed
https://images-example.evolvestorefront.com/products/couch.jpg?format=avif&width=400

Couch - AVIF, 400px wide

https://images-example.evolvestorefront.com/products/couch.jpg?format=avif&height=250

Couch - AVIF, 250px tall

Examples

The following table shows more examples of how the parameters affect the output image.

URLOutput Image (file type, dimensions, file size)
/products/couch.jpgCouch - original
JPEG, 600x600 px, 27.2 Kb
/products/couch.jpg?format=jpegCouch - original
JPEG, 600x600 px, 27.2 Kb
/products/couch.jpg?format=jpeg&quality=10Couch - low quality
JPEG, 600x600 px, 5.5 Kb
/products/couch.jpg?format=jpeg&quality=100Couch - high quality
JPEG, 600x600 px, 100 Kb
/products/couch.jpg?format=autoCouch - AVIF format
AVIF, 600x600 px, 5.7 Kb
/products/couch.jpg?format=auto&width=400Couch - AVIF, width changed
AVIF, 400x400 px, 2.5 Kb
/products/couch.jpg?format=auto&height=250Couch - AVIF, height changed
AVIF, 250x250 px, 1.7 Kb
/products/couch.jpg?format=auto&width=400&height=250Couch - AVIF, width and height changed
AVIF, 400x250 px, 2.8 Kb

See the API documentation for more information.