Wp-calypso: Gallery Cards: Ignore small images

Created on 4 Nov 2016  路  8Comments  路  Source: Automattic/wp-calypso

This post: https://wpcalypso.wordpress.com/read/feeds/34222/posts/1211847530

Creates this card in Reader:
screen shot 2016-11-04 at 11 40 27 am

The gallery card is omitting this big image: https://youarenotsosmart.files.wordpress.com/2016/11/chems.png

But it includes these images:
https://youarenotsosmart.files.wordpress.com/2014/01/screenshot_13.jpg
https://youarenotsosmart.files.wordpress.com/2016/07/screen-shot-2016-07-18-at-11-34-02-am.png
https://youarenotsosmart.files.wordpress.com/2016/08/screen-shot-2016-08-24-at-6-15-48-pm.png
https://youarenotsosmart.files.wordpress.com/2016/07/6a00d83451b36c69e201b8d0ed5719970c-300wi.png

Most of those images are pretty small.

So, questions:

鈥⒙燱ill the gallery card currently pick any image?
鈥⒙燙an we set a minimum size requirement for images to be considered for Gallery cards?
鈥⒙燱ill #9149 change the behavior here?

Ideally we'd ignore any image that's under 350px wide as usual here to avoid little bugs and logos for the gallery card. Possible?

cc @blowery, @bluefuton, @samouri

Reader [Type] Question

All 8 comments

  1. currently the gallery only takes images from the content and ignores the featured image.
  2. we can but it will be subject to the same _flashing_ found here. Flashing means that we will make an initial best-effort guess without knowing actual sizes, and then right after its loaded make some adjustments based on gathered sizes.
  3. Shoudn't have an effect on this. 9149 only affect cards where it was already decided it cannot be a gallery (not enough images)

https://github.com/Automattic/wp-calypso/pull/9238 should help with the flashing, though it won't eliminate it

for 1) we can just walk post.images instead of post.content_images I think. It has the feature prepended, though maybe not deduped... have to check into that.

@blowery I'm wondering if we should ignore ignore the featured image for gallery cards. I'm seeing a few where the featured image is both in the post and the featured image, so it's appearing in cards twice.

screen shot 2016-11-14 at 11 04 22 am

We can dedupe that. Looking into it.

We already do the same exact thing for full-post (if image is both featured & in content then don't display image twice) source

@fraying try it again? think I fixed it with 491f2d2

@blowery Much better! 馃憤

Was this page helpful?
0 / 5 - 0 ratings