[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
Wed Oct 30 21:04:28 UTC 2019
#36822: srcset is added to <img /> even if media file is not present in media
library
--------------------------+------------------------
Reporter: temmokan | Owner: joemcgill
Type: defect (bug) | Status: closed
Priority: normal | Milestone:
Component: Media | Version: 4.4.1
Severity: normal | Resolution: wontfix
Keywords: | Focuses:
--------------------------+------------------------
Changes (by desrosj):
* keywords: close =>
* status: accepted => closed
* resolution: => wontfix
Old description:
> Summary: if link to image ends with string like
>
> "YYYY/MM/filename.ext"
>
> and there are image files in MEdia library residing in
>
> /wp-content/upload/YYYY/MM
>
> then some of those files will be used to generate "responsive image"
> feature, adding srcset/sizes attributes
>
> Example 1: On Wordpress site http://example.com, document contains markup
> like
>
> <img src="/wp-content/uploads/YYYY/MM/filename.png">
>
> where the above file is *not* part of Media library (it just resides in
> that folder). srcset is added with link to (arbitrary selected?) image
> file within that folder.
>
> Expected behaviour: no srcset/sizes should be added.
>
> Example 2: On Wordpress site http://example.com, document contains markup
> like
>
> <img src="http://cdn.example.com/wp-
> content/uploads/YYYY/MM/filename.png">
>
> where cdn.example.com is *not* an alias for example.com, but altogether
> external resource
>
> Once again, srcset is added with link to (arbitrary selected?) image file
> within folder YYYY/MM in Media library.
>
> Expected behaviour: no srcset/sizes should be added.
New description:
Summary: if link to image ends with string like
"YYYY/MM/filename.ext"
and there are image files in MEdia library residing in
/wp-content/upload/YYYY/MM
then some of those files will be used to generate "responsive image"
feature, adding srcset/sizes attributes
Example 1: On WordPress site http://example.com, document contains markup
like
<img src="/wp-content/uploads/YYYY/MM/filename.png">
where the above file is *not* part of Media library (it just resides in
that folder). srcset is added with link to (arbitrary selected?) image
file within that folder.
Expected behaviour: no srcset/sizes should be added.
Example 2: On Wordpress site http://example.com, document contains markup
like
<img src="http://cdn.example.com/wp-content/uploads/YYYY/MM/filename.png">
where cdn.example.com is *not* an alias for example.com, but altogether
external resource
Once again, srcset is added with link to (arbitrary selected?) image file
within folder YYYY/MM in Media library.
Expected behaviour: no srcset/sizes should be added.
--
Comment:
Closing this out from @joemcgill's recommendation.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/36822#comment:13>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list