microbin icon indicating copy to clipboard operation
microbin copied to clipboard

Image previews are not displayed correctly.

Open zeek-zag opened this issue 2 years ago • 3 comments

Describe the bug Image previews on preview pages are not keeping their aspect ratios. Seems like there's a hard limit for height but not for the width.

To Reproduce Steps to reproduce the behavior:

  1. Create a new paste,
  2. Upload a picture,
  3. Uploaded picture is distroted on the preview.

Expected behavior Picture displays and scales properly.

Screenshots Pardon the spiderman meme. It's the only overly long pic I had on hand 😄. Screenshot from 2023-07-12 13-38-22

Desktop 1:

  • OS: Win10 LTSC
  • Browser Firefox 115.0.1 and Ungoogled Chromium 114.0.5735.199

Desktop 2:

  • OS: Fedora Workstation 38
  • Browser Firefox 115.0 and Ungoogled Chromium 114.0.5735.199

zeek-zag avatar Jul 12 '23 11:07 zeek-zag

Thanks for reporting this! I will look into it in a bit. Last time I had this issue, it was on my iPad in Safari but haven't seen it since. Should be a pretty easy fix if it's just some CSS issue.

szabodanika avatar Jul 12 '23 12:07 szabodanika

I'm seeing the same issue, aspect ratio is meesed up on the preview. The other odd thing is when I click on one of the key s that is an image, the first few lines of the image are displayed, then a loooong pause, then the rest of the image previews.

mcdent avatar Jul 17 '23 11:07 mcdent

Regarding the slow image preview loading, that's certainly a CPU performance issue on the server as it's serving the image line by line, but this might be improved in the next release because I will change how unencrypted file attachments are served

szabodanika avatar Jul 17 '23 11:07 szabodanika