[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
Thu Nov 29 02:22:13 UTC 2018


#45407: Add block attributes to `wp_calculate_image_sizes` to allow for proper
handling of `sizes` attribute
--------------------------+---------------------
 Reporter:  mor10         |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  5.0
Component:  Media         |     Version:
 Severity:  blocker       |  Resolution:
 Keywords:                |     Focuses:
--------------------------+---------------------

Comment (by mor10):

 A request has been made for a test to show current and corrected behavior,
 so I've built them both:

 The two posts linked below show the current output from core and a
 corrected version respectively. Note the detailed instructions on how to
 test this. Responsive images are a core browser feature and browsers work
 very hard to make the functionality invisible. Forcing visibility requires
 being rather heavy handed in your testing.

 Take special note of the following:
 **Responsive images are impacted by display density. When you do testing,
 make sure you test for both 1x and 2x displays. This can be done using the
 mobile preview in your browser dev tools.**

 - Demo 1: Auto-generated `sizes` provided by core
 https://gutenberg.mor10.com/image-test-current/
 - Demo 2: Same content with corrected `sizes` attributes
 https://gutenberg.mor10.com/responsive-images-demo-corrected-code/

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/45407#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list