WordPress-Android icon indicating copy to clipboard operation
WordPress-Android copied to clipboard

[Reader Improvements] Improve rules for featured image in Post feed card

Open thomashorta opened this issue 1 year ago • 0 comments

I am opening this issue so we can try to implement some more specific rules for loading the featured image in the post card in the feeds, so they preserve the original aspect ration most of the time, without being too tall or too short.

I tried doing something related to this while working on the Post feed card new design implementation but it proved harder than expected, since we are setting the size and scaling of this image in 3 different places to achieve the final imageView:

  1. when forming the URL to get the image from backend / Photon
  2. in the XML layout, by setting some constraints
  3. in Glide when actually loading the URL from above, by setting some Transforms

Initial expected rules

Full discussion ref: p1695993418154159-slack-C05N140C8H5

We can aim to keep as close to the original image content as possible for most images. Then crop for very wide or very large. Rather than having a set aspect ratio that crops the majority of images.

ref: p1695994450160959/1695993418.154159-slack-C05N140C8H5

[...] I think vertically, having the max height as something like 6(w):9(h) might make sense. As taller than that, it will not be visible in one scroll area. for width I think if we applied a min height of about 80px, that will stop any crazy super wide, super tiny images.

ref: p1696005375104389/1695993418.154159-slack-C05N140C8H5

thomashorta avatar Sep 29 '23 20:09 thomashorta