Using Images Pro

This documentation is part of Statically Pro.

Images let you optimize and resize images effortlessly.

Usage

/img/:username/:domain/:params/:file

Definitions

:username - Your Statically username

: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/:username/static.web.id/h=100/dog.jpg

h=100

w=:pixel

Set new image width in pixel.

Example:

/img/:username/static.web.id/w=200/dog.jpg

w=200

f=auto

Automatically convert images to WebP format when browser supports it.

Example:

/img/:username/static.web.id/f=auto/dog.jpg

f=auto

f=webp

Forcibly convert images to WebP format.

Example:

/img/:username/static.web.id/f=webp/dog.jpg

f=auto

q=:percentage

Set new image quality. Default to 85.

Value: 10 - 100.

Example:

/img/:username/static.web.id/q=50/dog.jpg

q=85

fit

Cropped image to fit within the area specified by w and h.

Value: crop.

Example:

/img/:username/static.web.id/fit=crop,w=200,h=200/dog.jpg

fit=crop

dpr

Multiplier for w and h.

Value: Integer.

Example:

/img/:username/static.web.id/dpr=2,w=200/dog.jpg

dpr=2