[wp-trac] [WordPress Trac] #55872: wp_image_add_srcset_and_sizes trys to parse images from external pages, fails with error

WordPress Trac noreply at wordpress.org
Mon May 30 08:08:17 UTC 2022


#55872: wp_image_add_srcset_and_sizes trys to parse images from external pages,
fails with error
----------------------------+-----------------------------
 Reporter:  pampfelimetten  |      Owner:  (none)
     Type:  defect (bug)    |     Status:  new
 Priority:  normal          |  Milestone:  Awaiting Review
Component:  Media           |    Version:  6.0
 Severity:  normal          |   Keywords:
  Focuses:                  |
----------------------------+-----------------------------
 If a user embeds image content from another domain by copy pasting and
 includes a tag like

 {{{
 <img class="wp-image-199052" srs="externaldomain...">
 }}}
 it seems like wordpress trys to parse the file as it were hosted in its
 own instance. This won't work of course, because it cannot access the file
 in the filesystem. It then fails with the following warning:

 {{{
 PHP Warning:  Undefined array key "file" in /wp-includes/media.php on line
 1676"
 }}}

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


More information about the wp-trac mailing list