WordPress.org

Make WordPress Core

Opened 21 months ago

Last modified 3 months ago

#47091 new enhancement

REST get wp/v2/media sizes to include add_image_size()

Reported by: shaneyu Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Media Keywords: reporter-feedback
Focuses: rest-api Cc:

Description

Media returned from the API returns as sizes attribute.

These sizes are only the default sizes from wordpress. Sizes added via add_image_size() are not available.

This would be a great feature for wordpress, allowing users to upload an image once, do all the cropping there, and insert that image in the ways that they want through gutenberg. The current experience is broken up due to the need to do production work outside of gutenberg.

Change History (3)

This ticket was mentioned in Slack in #core-media by antpb. View the logs.


21 months ago

#2 @SergeyBiryukov
21 months ago

  • Focuses rest-api added

#3 @TimothyBlynJacobs
3 months ago

  • Keywords reporter-feedback added

How are you registering your image sizes @shaneyu? The REST API returns all image sizes that are stored for an image. Do they appear in the missing_image_sizes field?

Note: See TracTickets for help on using tickets.