-
Notifications
You must be signed in to change notification settings - Fork 85
Description
Context
As the German idiom goes, "vor der eigenen Tür kehren" (sweep in front of one's own door), before asking image-focused platforms to add Article support, we should first improve how we detect and represent image-focused posts on our end.
- Add support for Article type objects VernissageApp/VernissageServer#442
- Accept ActivityPub Article type objects pixelfed/pixelfed#6458
Image-focused Fediverse platforms like Vernissage and Pixelfed only handle Note objects with image attachments. They shouldn't need to add special handling for Article just because WordPress sends blog posts that way. If a WordPress post is essentially a collection of images with minimal text, we should be smart enough to detect that and send it as a Note with attachments instead.
Current behavior
The plugin determines the object type (Article vs Note) based on WordPress post formats:
- No post format / standard →
Article - Post formats like
aside,gallery,image,video, etc. →Note - No title →
Note - Pages →
Page
This means a photo-heavy blog post with a title and no explicit post format is always sent as an Article — even if the content is 90% images. These posts are invisible on image-focused platforms because they don't process Article objects.
Ideas to explore
-
Content-based heuristics — Analyze the post content to determine if images are the dominant element. If a post is mostly images with little text, send it as a
Noteregardless of post format. -
Image-to-text ratio detection — Calculate the ratio of image blocks/elements to text content. Posts exceeding a threshold could be treated as image-focused.
-
Gallery and image block detection — Posts consisting primarily of
core/gallery,core/image,jetpack/tiled-gallery, orjetpack/slideshowblocks could be detected as image-focused content. -
Better attachment metadata — Ensure image attachments include rich metadata (dimensions, focal point, alt text) so that platforms that do display them can do it well.
-
Make the detection filterable — Provide a filter so themes and plugins (e.g., photo blogging plugins) can signal that their posts are image-focused.
-
Increase default attachment limit —
activitypub_max_image_attachmentsdefaults to 4, which may be too low for photo-heavy posts.
Related
- The
filter_media_by_object_typefilter already exists for customizing media output per post type - WordPress post formats (
image,gallery) already exist but are rarely used by themes - FEP-b2b8 discusses Article handling: https://codeberg.org/fediverse/fep/src/branch/main/fep/b2b8/fep-b2b8.md