Why does Discourse mangle images I upload?


#1

Example:

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
#2

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


#3

Actually by linking.


SMBC

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:


SMBC


#4

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


#5

Here’s what I see on my phone:


#6

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

`
SMBC`

vs

`
SMBC
`

#7

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


#8

Thanks…my first suspicion would be CSS, mind.


#9

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


#10

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
#11

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


#12

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


#13