DEV Community

Casper Tran
Casper Tran

Posted on

format=jpg works on Cloudinary and imgix. On Shopify it does nothing

When Chrome saves a .webp you didn't want, the usual advice is "change format=webp to jpg in the address". I tested that on four image CDNs this morning (17 November 2026) with curl, sending the Accept header Chrome sends for images: image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8. It works on three of them. Shopify behaves differently.

Cloudinary: the transform segment wins

Demo image res.cloudinary.com/demo/image/upload/<f>/sample.jpg:

Segment Content-Type Bytes
f_auto image/avif 38,161
f_webp image/webp 46,116
f_jpg image/jpeg 120,253
f_png image/png 688,611

f_auto reads the Accept header and picks AVIF for Chrome. Any explicit f_ value overrides it. PNG comes out 18 times heavier than the AVIF for the same photo.

imgix and Unsplash: fm wins, auto=format negotiates

assets.imgix.net/hp/snowshoe.jpg?w=1200:

Query Content-Type Bytes
none image/jpeg 193,987
fm=webp image/webp 233,612
fm=jpg image/jpeg 193,998
auto=format image/avif 155,579

The WebP here is larger than the JPEG. Unsplash runs on imgix and gave the same pattern: no parameter or fm=jpg returned a 179,799-byte JPEG, and auto=format returned a 127,875-byte AVIF. So on these two, an image only turns into WebP or AVIF because the site asked for it in the URL. Delete auto=format or set fm=jpg and you get the JPEG.

Shopify: format=jpg does nothing

Shopify's CDN takes a format parameter too, but on a JPG product photo from Brooklinen (?width=1200) I got:

Query Content-Type Bytes
none image/webp 118,350
format=jpg image/webp 118,350
format=png image/webp 118,350
format=pjpg image/jpeg 247,490

Only pjpg (progressive JPEG) forces a JPEG. On a transparent PNG product image from Allbirds, a test earlier today found that even pjpg kept returning WebP.

The Accept header explains the rest. With the same URL and no parameter:

Accept Content-Type
*/* image/jpeg
image/webp,*/* image/webp
image/avif,*/* image/jpeg

Shopify sends WebP only when the browser lists it. It never sent AVIF, even when AVIF was the only modern format listed.

A five-line check

A='image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8'
for u in "$@"; do
  curl -s -H "Accept: $A" -o /dev/null \
    -w "%{content_type} %{size_download} $u\n" "$u"
done
Enter fullscreen mode Exit fullscreen mode

Pass it the same image with each parameter variant and you see what Chrome would get before you try saving anything.

When there is no parameter

Next.js /_next/image and WordPress Jetpack (i0.wp.com) have no format parameter, so they decide from the Accept header alone. There you either convert the saved file locally or use a right-click extension that re-encodes it. I build one, PixLasso. Its free Save image as JPG fetches the full-size file and redraws it at 92% JPEG quality on your machine. The full table, including the steps for Paint and Preview, is in the WebP to JPG guide.

Top comments (0)