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
w=:pixel
Set new image width in pixel.
Example:
/img/statically.dev/w=200/dog.jpg
f=auto
Automatically convert images to WebP format when browser supports it.
Example:
/img/statically.dev/f=auto/dog.jpg
f=webp
Forcibly convert images to WebP format.
Example:
/img/statically.dev/f=webp/dog.jpg
q=:percentage
Set new image quality. Default to 85
.
Value: 10 - 100
.
Example:
/img/statically.dev/q=50/dog.jpg