[wp-trac] [WordPress Trac] #36822: srcset is added to <img /> even if media file is not present in media library

WordPress Trac noreply at wordpress.org
Fri Jul 15 03:30:38 UTC 2016


#36822: srcset is added to <img /> even if media file is not present in media
library
--------------------------+-----------------------------
 Reporter:  temmokan      |       Owner:  joemcgill
     Type:  defect (bug)  |      Status:  accepted
 Priority:  normal        |   Milestone:  Future Release
Component:  Media         |     Version:  4.4.1
 Severity:  normal        |  Resolution:
 Keywords:  close         |     Focuses:
--------------------------+-----------------------------
Changes (by joemcgill):

 * keywords:  responsive has-patch needs-unit-tests => close
 * milestone:  4.6 => Future Release


Comment:

 After confirming that the current approach in [attachment:36822.diff]
 would indeed break some CDN implementations by being more strict about
 path matching, I'm leaning towards closing this as a 'wontfix', unless we
 can come up with a better plan for detecting and avoiding false positives
 like the ones reported.

 The problem here is that there ''is'' a valid image in the media library
 with the same filename as the attachment id referenced in the `class`
 attribute of the image. We could probably make the assumptions more clear
 with a note in the documentation, but it's not immediately clear what else
 could be done here.

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


More information about the wp-trac mailing list