Skip to content

Transformations Mapping Imgix:Fastly:Snappy

Joarley Moraes edited this page Oct 5, 2017 · 5 revisions

Resize

w and h:

Fastly: Force scaling to w and h, distorting the image (I)
imgix: Scale to either w or h while keeping the AR (aspect ratio). (if the provided AR is the same as the original image, then both w and h are met) (II)
Snappy: Use Fastly

either w or h:

Fastly: Scale to the given side, adjusting the other side to keep the AR. (III)
imgix: Same as (III)
Snappy: Use Fastly

w and h with fit=crop:

Fastly: scale to larger side cutting off what overflows the specified bounds (IV)
imgix: Same as (IV)
Snappy: Use Fastly

w and h with fit=clip:

Fastly: N/A
imgix: same as (II)
Snappy: Use imgix

w and h with fit=bounds:

Fastly: same as (II)
imgix: N/A
Snappy: Use Fastly

Format

fm=<str>

Fastly: convert to the specified format from supported: [jpg, png, gif, webp]
imgix: convert to the specified format from supported: [gif, jp2, jpg, json, jxr, mp4, png, png8, png32, and webp].
Snappy: Use Fastly/imgix, with support for [jpg, jpeg, png, gif, webp]

Quality

q=<int>

Fastly: Controls the output quality of lossy file formats: [jpg and webp]. Value can be between 1 to 100 and default is 85
imgix: Controls the output quality of lossy file formats: [jpg, pjpg, webp, or jxr]. Value can be between 0 to 100 and default is 75
Snappy: Use Fastly

DPR

dpr=<value>

Fastly: Apply resize transformations (if any) then scale the image to the dpr value provided.
imgix: It only works if w or h, or both is specified. After resizing, it scales the image to the dpr value provided.
Snappy: Use Fastly

Auto

auto=compress:

Fastly: N/A
imgix: set q=45 and remove image profiles.
Snappy: Use imgix