Media Upload Endpoint and Remote Media Library #2329
Replies: 1 comment 1 reply
-
Media Upload Endpoint and Remote Media Library
The appropriate approach may vary depending on the object type, My current idea is to first load the JSON-LD metadata of all attachment objects, then render the appropriate image size version according to the viewport value, applying lazy loading to inline images or gallery blocks within the content field. To implement inline images in the content field of an article, an extension of the HTML markup language is required.
Yes, I know that Mastodon caches all attachment images locally, but WordPress operates on a very different architecture. If there is no media library, implementing the media object endpoint will be difficult, so the existence of a media object can be assumed to mean that a media library and media upload endpoint exist. My opinion is that for this reason, media file direct links and media objects should be clearly distinguished. The attachment page is the ideal location because it includes the JSON-LD representation of the media object. For platforms that have a media library, In fact, most microblogging platforms in the Fediverse do not have media libraries. In both cases, I think the default behavior should maintain hotlinking (remote connections). I think the content of a remote image object should basically maintain a hotlink. When license extensions are applied, files are optionally cached locally, and the file URL is replaced with a local URL only when explicit reuse permission is granted, but the original URI is preserved.
The fact that remote media attachments remain even after the remote article is deleted is normal, because it means the media can continue to be reused through the media library.
https://fedi.tips/how-to-download-your-mastodon-post-archive/ Additional reference materials #2146 (comment) #2145 https://make.wordpress.org/core/2023/07/07/media-library/
https://make.wordpress.org/ai/2025/07/17/ai-building-blocks/
https://core.trac.wordpress.org/ticket/63953 Inline images and attachmentsAll inline images in an Article should also appear in
FEP-1311: Media Attachments introduces the concept of multiple media versions and licensing. FEP-e232: Object Links Issue with WordPress:
Multiple media versionsFor heavy photologs (up to 50 images per post), embedding all versions in the Article object is inefficient.
Related core proposal: |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
This post expands on some ideas mentioned in [#2314 – Add Attachments processor class for handling ActivityPub media](#2314), particularly around how remote vs. local media handling should work in WordPress.
1. Background
Recent improvements such as smart media markup and inline image handling have raised an important architectural question:
How should ActivityPub attachments (media objects) be handled differently from direct media file links?
Platforms like Mastodon cache all attachments locally, but WordPress operates with a Media Library, which introduces a fundamentally different model.
Therefore, the optimal approach may depend on the object type (e.g.,
Article
vs.Note
) and the presence of a media library endpoint.2. Key distinctions
Media file direct links
Media objects
?remote_attachment_id=123
for access and federation.3. Proposed workflow
Load attachment JSON-LD metadata first.
Then apply lazy loading for inline images or gallery blocks based on viewport size.
Implement remote media objects as hotlinks by default.
The content of a remote image object remains a hotlink unless explicit reuse permission (license) is declared.
Optional local caching with license extension.
If a [FEP-c118 Content Licensing](https://codeberg.org/fediverse/fep/src/branch/main/fep/c118/fep-c118.md) policy is detected, the system may:
Remote attachment persistence.
Remote media attachment pages can remain even after the original post is deleted, since they may be reused or referenced via the media library.
4. Inline images and multiple versions
According to [FEP-b2b8: Long-form Text](https://codeberg.org/fediverse/fep/src/branch/main/fep/b2b8/fep-b2b8.md#content),
However, WordPress’s Gutenberg system often uses gallery blocks with multiple image versions.
This makes simple inline-image models insufficient.
A better approach could follow the principles of [FEP-1311](https://codeberg.org/fediverse/fep/src/branch/main/fep/1311/fep-1311.md) (multiple media versions) and [FEP-e232](https://codeberg.org/fediverse/fep/src/branch/main/fep/e232/fep-e232.md) (object links).
For performance, Articles might reference a container URI (improved
attachment_id
permalink) that serves all image versions.5. Relation to core proposals
?attachment_id=123
These efforts align naturally with the goal of introducing a Remote Media Library and Media Upload Endpoint for federated environments.
6. Conclusion
In summary:
inReplyTo
) on remote media attachment pages once the underlying endpoint exists.I’ll continue exploring this idea under the title “Media Upload Endpoint and Remote Media Library.”
Beta Was this translation helpful? Give feedback.
All reactions