Skip to content

Improve detection and signaling of image-focused posts for federation #2903

@pfefferle

Description

@pfefferle

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.

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 / standardArticle
  • Post formats like aside, gallery, image, video, etc.Note
  • No titleNote
  • PagesPage

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

  1. 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 Note regardless of post format.

  2. 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.

  3. Gallery and image block detection — Posts consisting primarily of core/gallery, core/image, jetpack/tiled-gallery, or jetpack/slideshow blocks could be detected as image-focused content.

  4. 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.

  5. Make the detection filterable — Provide a filter so themes and plugins (e.g., photo blogging plugins) can signal that their posts are image-focused.

  6. Increase default attachment limitactivitypub_max_image_attachments defaults to 4, which may be too low for photo-heavy posts.

Related

Metadata

Metadata

Assignees

Labels

EnhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions