[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
Sat May 21 05:30:09 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:  reviewing
 Priority:  normal            |   Milestone:  Awaiting Review
Component:  Media             |     Version:  4.5.2
 Severity:  normal            |  Resolution:
 Keywords:  responsive media  |     Focuses:
------------------------------+------------------------------

Comment (by temmokan):

 The lowest image has been added from Media library; its HTML is

 {{{
 <img src="http://app-sandbox.com/wordpress/wp-
 content/uploads/2016/05/pic321.png" alt="pic321" width="300" height="225"
 class="alignnone size-medium wp-image-4" />
 }}}

 Other two have been added by selecting/copy-pasting the above, with "src"
 attribute replaced with the one for other two images. Note: I usually use
 HTML mode of editing instead of rich editor.

 As far as I see, the code processing media files should detect whether
 it's allowed to insert source set attributes, to avoid the results such as
 shown.

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


More information about the wp-trac mailing list