Make WordPress Core

Opened 5 years ago

Last modified 4 years ago

#47091 new enhancement

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

Reported by: shaneyu's profile 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.


5 years ago

#2 @SergeyBiryukov
5 years ago

  • Focuses rest-api added

#3 @TimothyBlynJacobs
4 years 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.