Open ajaykj opened 4 years ago
Thanks for the report @ajaykj.
To find an image to display, the iOS reader checks for a featured image, then for featured media, then looks through images in the post content. Looking at the API response for the post in question, we can see that there is no featured image, but there is featured media being returned by the API. (The image url is https://wildgooseland.files.wordpress.com/2020/01/fullsizeoutput_8924.jpeg which is what we see cropped in the reader card.) And setting a break point in the debugger confirms that featured media is what the app is selecting.
The API looks through post content and attachments to find a "feature worthy" image. You can find the relevant code by searching opengrok for find_featured_worthy_media
. This particular post has 22 different attachments (you can see them listed in the JSON response). I haven't checked to see if any actually appear in the post content. Anyway, this is why that particular image is appearing in the iOS reader (and the Android Reader as well).
As far as being a bug, the apps are doing what they are supposed to. Featured media used to be how the calypso reader identified its featured media but I guess we've gotten away from that at some point. We can probably update the apps to not look at the featured media field, or check it depending on the type of reader stream being viewed.
For a quick fix our user could try removing all the attachments from that post.
Fails | |
---|---|
:no_entry_sign: | Please add a type label to this issue. e.g. '[Type] Enhancement' |
Generated by :no_entry_sign: dangerJS
Adding this to our maintenance rotation with a note to say we should do a more in-depth review of how the Calypso Reader displays featured images and decide whether we need to update the apps to be in line with that.
Actually, I'm no longer sure we need an in-depth review to match up with Calypso Reader. 🙂
I think the mobile app should check for featured media and use that first if it's available.
@bummytime @yaelirub agree? and should this one be part of the upcoming Reader Improvements project or should it stay in the Groundskeeping maintenance project?
@designsimply from my perspective, the investigation of how Calypso Reader displays featured images would still be of value (and we should match it). Also, since a fix here would update WPKit code, the reader improvements effort may not naturally address this.
I will yield to @yaelirub for her thoughts on this. 😄
Thanks for the ping, @designsimply 🙏 I'd prefer to leave this issue in Groundskeeping
Expected behavior
To see an image from the post as the thumbnail image as showing in the reader on https://wordpress.com/read/feeds/101350369
Actual behavior
The latest post of this user’s site in the reader feed is showing an image from their media library and not linked to the post. The user deleted this image and the reader started showing a different unrelated image from the media library.
Tested on [device], iOS [version], WPiOS [version]
iOS app 14.0
p1580316222001700-apps-slack