[wp-trac] [WordPress Trac] #45407: Add block attributes to `wp_calculate_image_sizes` to allow for proper handling of `sizes` attribute
WordPress Trac
noreply at wordpress.org
Fri Jan 18 23:13:58 UTC 2019
#45407: Add block attributes to `wp_calculate_image_sizes` to allow for proper
handling of `sizes` attribute
--------------------------+------------------------
Reporter: mor10 | Owner: joemcgill
Type: defect (bug) | Status: assigned
Priority: high | Milestone: 5.2
Component: Media | Version:
Severity: major | Resolution:
Keywords: dev-feedback | Focuses:
--------------------------+------------------------
Changes (by joemcgill):
* milestone: 5.1 => 5.2
Comment:
The approach in [attachment:"45407.diff"] requires image blocks to be
rendered on the server rather than directly using the markup stored in
post content. Since that part has not been implemented in Gutenberg
yet—and might not—I'm going to punt this for now.
Another potential approach would be to modify the regex in
`wp_make_content_images_responsive()` so it includes containing `figure`
elements and pass alignment data as a new parameter to
`wp_image_add_srcset_and_sizes()`, which can then be added to the filter
for `sizes`.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/45407#comment:29>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list