thunder icon indicating copy to clipboard operation
thunder copied to clipboard

Full sized images getting resized into different aspect ratios

Open RandomDennisLee opened this issue 1 year ago • 3 comments

Bug Description

In the feed, with images set to display at full height, they are getting squeezed into smaller heights, making their aspect ratio extremely wrong.

Expected Behaviour

Images display at full height as per settings

Steps to Reproduce

Version 0.6.0-1

Screenshot_20241129_041208_com hjiangsu thunder Screenshot_20241129_041711_com hjiangsu thunder

Additional Context

No response

App Version

No response

Device

Huawei p30 pro

OS

Android 12

RandomDennisLee avatar Nov 29 '24 03:11 RandomDennisLee

Related to #1448?

micahmo avatar Nov 30 '24 22:11 micahmo

Possibly, but with some differences. It's still present in 0.6.0-1, and it only affects some images in the feed.

RandomDennisLee avatar Nov 30 '24 23:11 RandomDennisLee

Thanks for the report! This is an on-going issue and more details are mentioned in the closed issue. To re-iterate on it:

For some additional context into why this issue occurs:

  • Lemmy's API doesn't pass back the image's height/width information when we fetch the posts. We need this height/width information in order to determine the proper amount of "space" to allocate to the image in the feed (otherwise, scrolling through the feed makes everything jump around which is not ideal).
  • In order to work around this, we calculate each image's width/height after we get the post information. Before we do this though, we need to fetch the image itself which can sometimes take a long time (depending on the size of the image, the network, etc.). As a safe guard, we place a maximum timeout for how long we allow the image fetching to take place. If it takes too long to fetch the image, we set a default dimension size for the image (which is why you might encounter the squished images).

The good news here is that Lemmy just recently released 0.19.6 with support for image dimensions, so this issue should no longer affect instances that are running on 0.19.6 or later (alongside an update to the nightly version for Thunder soon https://github.com/thunder-app/thunder/pull/1594)

hjiangsu avatar Dec 04 '24 21:12 hjiangsu