Skip to content

Expose source_url for all additional mime types via REST API #167

@mitogh

Description

@mitogh

Feature Description

WordPress already has a defined endpoint for each media item located at wp-json/wp/v2/media/{ATTACHMENT_ID} this ticket is to suggest the inclusion of additional mime types (if present) for that particular image beside the default mime type for an image, this would allow API consumers to have access to both image mime types using the REST API.

Another suggested approach could be to add a new query parameter to allow developers to request a specific mime type instead so the API would remain the same but with the difference that internally would query for the requested mime type if present and deliver those results back via the REST API.

This can be accomplished from within the plugin filtering rest_prepare_attachment to insert or update the response as need it.

Related issues

Metadata

Metadata

Labels

Needs DiscussionAnything that needs a discussion/agreement[Plugin] Modern Image FormatsIssues for the Modern Image Formats plugin (formerly WebP Uploads)[Type] EnhancementA suggestion for improvement of an existing feature

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions