Using Images

Images let you optimize and resize images effortlessly.

Usage

/img/:domain/:params/:file

Definitions

:domain - Domain name of the origin.

:params - Filters to controls image.

:file - The file URL.

Cache Control

Image files will be cached on the CDN for 1 year.

File Size Limit

The limit for the image file size you can load with Images is 20MB, otherwise an error may appear.

Supported Image Types

  • GIF
  • JPEG
  • PNG
  • WebP

Parameters

Here is the full list API parameters that can be used for controling images.

h=:pixel

Set new image height in pixel.

Example:

/img/statically.dev/h=100/dog.jpg

h=100

w=:pixel

Set new image width in pixel.

Example:

/img/statically.dev/w=200/dog.jpg

w=200

f=auto

Automatically convert images to WebP format when browser supports it.

Example:

/img/statically.dev/f=auto/dog.jpg

f=auto

f=webp

Forcibly convert images to WebP format.

Example:

/img/statically.dev/f=webp/dog.jpg

f=auto

q=:percentage

Set new image quality. Default to 85.

Value: 10 - 100.

Example:

/img/statically.dev/q=50/dog.jpg

q=85