Why does Discourse mangle images I upload?



This is almost invariably SMBC images, I’m not sure if there’s something about them I’m not aware of, or if it has something to do with their dimensions (typically very long). It used to just shrink them down dramatically for display in the thread, which was understandable, but now it just mangles them, even when I try to use height/width to shrink them to a more manageable size (they’ll look fine in the preview, but once I save, it goes back to mangling them).

20 amusing paradoxes and dilemmas to ponder

Can you upload a mangled version here? How are you uploading (via cut-paste or upload button) ?


Actually by linking.


Heh, and now it behaves properly. Before it would shrink to that height, but then stretch to the full width of the comment.

Oooh, there we go. Originally the image was in a link back to SMBC, but I wanted clicking on the reduced imaged to cause it to zoom, so I moved the link to just the text, and then the stretching happened again.

Below with it within the link:



It looked fine when I first loaded the page, but stretched out when I scrolled over it just now.


Here’s what I see on my phone:


Ah, good, just about to post screenshots in case it was just my browser:





Cool, thanks for the repro @zogstrip will have a look!


Thanks…my first suspicion would be CSS, mind.


Oh yeah this is certainly a regression @zogstrip will fix. I can repro on try.discourse.org as well with that image.


Thanks @Ratel, @tropo and @ficuswhisperer for reporting this issue. I just pushed a fix. It will be deployed here soon.

It’s deployed :tada:

20 amusing paradoxes and dilemmas to ponder

Wow, that’s great customer service on a crap bug report!


It’s actually a pretty great bug report, I could repro it immediately!