I noticed a bug where the thumbnail versions of uploaded WebP images are being converted to JPG format.

For example, you might have an image at https://i.sstatic.net/12345.webp. However, when the system generates thumbnails for this image at https://i.sstatic.net/12345m.webp (despite the file extension), it's creating them as JPG files instead of maintaining the WebP format.

This behavior is quite unexpected. If we're using WebP for the original image, wouldn't we also want to maintain that format for the thumbnails? WebP is a modern image format that often outperforms JPG in terms of compression and quality, so it seems counterintuitive to switch to an older format for thumbnails.

Here are the thumbnails of a WebP image I uploaded:

Small thumbnail:
sample WebP Image

Medium thumbnail:
sample WebP Image

Large thumbnail:
sample WebP Image

If you right-click on any of these thumbnails and open the image in a new tab or try to save it, you'll find that they're actually JPG files.

For reference, here are the direct links to these images:

I believe this unintended conversion could lead to a loss in image quality and larger file sizes.

Also, @ShadowWizard mentions in the comments that this bug affects user avatars as well. An avatar never shows the original (to block animation), so it will always serve JPG and not WebP.

  • 1
    Hopefully just an overlook, but there's a chance it's technically not possible, or too complicated, to resize a webp format programmatically. (Didn't dig into it) Commented Jul 10 at 7:46
  • 4
    Also note that it affects user avatars: avatar never show the original (to block animation), so it will always serve JPG and not WEBP. Commented Jul 10 at 7:47


You must log in to answer this question.

Browse other questions tagged .