Make WordPress Core

Opened 3 months ago

#43413 new defect (bug)

wp_prepare_attachment_for_js missing image size medium_large

Reported by: Themezly Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 4.9.4
Component: Media Keywords:
Focuses: Cc:


I have a function that creates a media size in case the size is called but is missing in meta. https://gist.github.com/danyj/2edb3d83bae4c363bf839f0dd5f1343f



every missing file size is recreated and exists in by wp_prepare_attachment_for_js size key except the media_large because it is missing here.


Basically if meta has been updated the wp_prepare_attachment_for_js is not checking for sizes but manually goes by that array . Not sure if the missing size key is left out on purpose but when you compare the wp_prepare_attachment_for_js to wp_get_attachment_metadata the data is not same

Change History (0)

Note: See TracTickets for help on using tickets.