[wp-trac] [WordPress Trac] #43540: srcset not added when the original image size doesn't exist in the database after regeneration

WordPress Trac noreply at wordpress.org
Wed Mar 14 17:40:41 UTC 2018


#43540: srcset not added when the original image size doesn't exist in the database
after regeneration
--------------------------+------------------------------
 Reporter:  smerriman     |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Media         |     Version:
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------------------

Comment (by joemcgill):

 Hi @smerriman,

 Thanks for describing this use case. In order to ensure that we're not
 including sources in the `srcset` that are unrelated to the `src` file, we
 have that check to ensure we have data about the `src` image in the
 attachment metadata from which to compare other sources. If that image is
 not listed in metadata after images have been regenerated, then it opens
 the possibility that the browser would be serving an different version of
 the image (e.g., from a different crop) rather than simply including the
 same image with different dimensions.

 I don't think there is a good fix for this case, besides ensuring you can
 filter the `srcset` to cover this case.

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


More information about the wp-trac mailing list