[wp-trac] [WordPress Trac] #43524: Add another default image size
WordPress Trac
noreply at wordpress.org
Thu Apr 23 00:10:10 UTC 2020
#43524: Add another default image size
--------------------------+------------------------
Reporter: azaozz | Owner: joemcgill
Type: enhancement | Status: closed
Priority: normal | Milestone: 5.3
Component: Media | Version:
Severity: normal | Resolution: fixed
Keywords: has-dev-note | Focuses:
--------------------------+------------------------
Comment (by bahia0019):
Has anyone run into an issue with newer sizes being an issue when querying
the REST API?
In JS identifiers can't start with a number. But they're now named by
their dimension.
So in a srcset function I built in JS, the first two variables in this are
valid, the second two fail:
{{{
const largeSource = slide.media_details.sizes.large.source_url
const largeWidth = slide.media_details.sizes.large.width
const fullscreenSource = slide.media_details.sizes.1536x1536.source_url
const fullscreenWidth = slide.media_details.sizes.1536x1536.width
}}}
Should I submit this as a separate bug?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/43524#comment:45>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list