Why does Discourse mangle images I upload?

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).

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

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

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

2 Likes

Here’s what I see on my phone:

1 Like

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

`
SMBC`

vs

`
SMBC
`

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

2 Likes

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.

1 Like

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

It’s deployed :tada:

5 Likes

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

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

4 Likes