[wp-trac] [WordPress Trac] #46885: Improvements/Issues with srcsets, additions to wp_calculate_image_srcset

WordPress Trac noreply at wordpress.org
Thu Apr 11 19:29:39 UTC 2019


#46885: Improvements/Issues with srcsets, additions to wp_calculate_image_srcset
-------------------------+-----------------------------
 Reporter:  pinktank     |      Owner:  (none)
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  Media        |    Version:  5.1
 Severity:  normal       |   Keywords:
  Focuses:               |
-------------------------+-----------------------------
 Hello All,
 I had a few issues that I've also found references to online without
 fixes. From the most basic to (slightly) more complicated.

 1) Include a way to not include the original src in srcset. When you are
 developing a theme there are many reasons you don't want to the original
 src. The most obvious is that the original src can be
 uncompressed/unoptimized for better derivatives, or simply because editors
 upload whatever they have. You could also be using a lq-placeholder
 replacement method where you load a low resolution image in the src for
 better UX and would like that to go first in the srcset load order.

 2) There is something strange with the way the srcset is ordered. In a
 current setup I'm getting original first(for ios 8 bug), followed by 360
 wide, 180 wide, 720wide, 1280wide. Not sure why the 360 is swapped with
 180.

 2) Accept an array of named image sizes to create custom srcsets instead
 of generating all registered image sizes.

 Thanks.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/46885>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list