14

Whenever an image is resized on Stack Exchange using URL modifiers, any transparent elements or backgrounds will be lost in the conversion.

Exactly how the missing transparency is handled can vary depending on the modifier being used, and the size of the image being converted.

When testing with a 1000x298 image:

  • l, m, t: Transparent background was converted to black
  • b, s, ?s=xyz: Transparent background was converted to white
  • h: Image was not modified (it was smaller than 1024×1024)
  • HTML modifier: Transparency is preserved

When testing with a 5525x1275 image:

  • h l, m, t, b, s, ?s=xyz: Transparent background was converted to black
  • HTML modifier: Transparency is preserved

A similar issue involving profile pictures was marked as back in 2013, so it seems odd that this issue would still be around.


Original (1000x298): https://i.sstatic.net/s1dWm.png

SE Logo - Full


Large Thumbnail (640x191): https://i.sstatic.net/s1dWml.png

SE Logo - Large


Medium Thumbnail (320x95): https://i.sstatic.net/s1dWmm.png

SE Logo - Medium


Small Thumbnail (160x48): https://i.sstatic.net/s1dWmt.png

SE Logo - Tiny


Big Square (160x160): https://i.sstatic.net/s1dWmb.png

SE Logo - Big


Small Square (90x90): https://i.sstatic.net/s1dWms.png

SE Logo - Small


?s=64 (64x64): https://i.sstatic.net/s1dWm.png?s=64

SE Logo - ?s=64


Custom HTML: <img src="https://i.sstatic.net/s1dWm.png" width="400">


-Thanks to Awesome Poodles, Emanuel Ve, and a cat for documenting imgur's URL modifiers

0

2 Answers 2

10

I'm declining this formally because it's been ongoing for years and incredibly unlikely to ever be fixed.

The decision to make this change is up to Imgur and Imgur alone. In order to resize and create new images, they have to do image processing themselves. It's their decision whether or not they want to attempt to preserve transparency in those resized images. Given that this issue has been discussed many times with the only change being an apparent flip back and forth between black and white backgrounds, I doubt it's going to change.

As an aside, losing transparency is explicitly by-design when the image size is over 1MB, according to this response from their staff. Sadly that's old, but I don't really see any further documentation regarding these issues from Imgur, and they don't appear to have active meta-like support anymore.

0
9

This has now changed to being as a result of the migration from Imgur to the new internal image host.

The new image host properly retains transparency on resizing images, not only with file name suffixes but also query parameters such as ?s=128, and all of the images you embed and link in your post have proper transparency. The following screenshot demonstrates the large thumbnail of the image (the l file name suffix); notice how both it and my user avatar (which is resized with the aforementioned query parameter) now show with transparency:

Logo and avatar with transparency

All old SE Imgur-hosted images have been migrated to the new image host, thereby retroactively resolving this issue for prior images as well.

1
  • 1
    I've changed this post to [status-completed] as your answer here correctly determines.
    – Slate StaffMod
    Commented Jul 3 at 20:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .