Skip to content

Commit 5bc5dbd

Browse files
committed
Add workaround for mshots
1 parent 6171603 commit 5bc5dbd

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Modules/Sources/WordPressKitObjC/RemoteReaderPost.m

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,14 @@ - (NSString *)featuredImageFromPostDictionary:(NSDictionary *)dict
507507
}
508508

509509
- (NSString *)editorialImageFromPostDictionary:(NSDictionary *)dict {
510-
return [dict stringForKeyPath:@"editorial.image"];
510+
NSString *imageURL = [dict stringForKeyPath:@"editorial.image"];
511+
// A workaround for https://linear.app/a8c/issue/CMM-994/reader-invalid-featured-images-for-posts-in-freshly-pressed-feed
512+
// The app does not support `mshots` images. We also never want to show
513+
// screenshots of posts as featured images, so it's safe to skip these.
514+
if ([imageURL containsString:@"wp.com/mshots/"]) {
515+
return nil;
516+
}
517+
return imageURL;
511518
}
512519

513520
- (NSString *)userSpecifiedFeaturedImageFromPostDictionary:(NSDictionary *)dict {

0 commit comments

Comments
 (0)