[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
Sun May 29 10:50:11 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: 4.6
Component: Media | Version: 4.4.1
Severity: normal | Resolution:
Keywords: responsive has-patch needs-unit- | Focuses:
tests |
-------------------------------------------------+-------------------------
Comment (by temmokan):
> What exactly is "not part of the media library"?
File has not been added to media library via corresponding Wordpress admin
interface.
> In any case don't think this is a typical case that needs to be
supported.
In other words, there will be code that will generate invalid markup in
case something "unusual" is encountered.
> The patch can break some CDNs that are working now.
Checkbox settings like "CDN is used to cache images" could be used,
checked by default, to allow stricter behaviour.
IMHO, "do not assume anything" should also be applied to Wordpress
programming. Any assumption not explicitly documented is a reason for many
had to track/handle problems.
That is, please document the exact behaviour as feature in case you do not
wish to handle all "unusual" cases correctly.
Thanks.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/36822#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list