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/statically.dev/h=100/dog.jpg
w=:pixel
Set new image width in pixel.
Example:
/img/:username/statically.dev/w=200/dog.jpg
f=auto
Automatically convert images to WebP format when browser supports it.
Example:
/img/:username/statically.dev/f=auto/dog.jpg
f=webp
Forcibly convert images to WebP format.
Example:
/img/:username/statically.dev/f=webp/dog.jpg
q=:percentage
Set new image quality. Default to 85
.
Value: 10 - 100
.
Example:
/img/:username/statically.dev/q=50/dog.jpg
fit
Cropped image to fit within the area specified by w
and h
.
Value: crop
.
Example:
/img/:username/statically.dev/fit=crop,w=200,h=200/dog.jpg
dpr
Multiplier for w
and h
.
Value: Integer
.
Example:
/img/:username/statically.dev/dpr=2,w=200/dog.jpg