Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Full sized images getting resized into different aspect ratios #1617

Open
RandomDennisLee opened this issue Nov 29, 2024 · 3 comments
Open
Labels
bug Something isn't working

Comments

@RandomDennisLee
Copy link

RandomDennisLee commented Nov 29, 2024

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 RandomDennisLee added the bug Something isn't working label Nov 29, 2024
@micahmo
Copy link
Member

micahmo commented Nov 30, 2024

Related to #1448?

@RandomDennisLee
Copy link
Author

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

@hjiangsu
Copy link
Member

hjiangsu commented Dec 4, 2024

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 #1594)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants