[wp-trac] [WordPress Trac] #35045: Responsive images not added when effective scheme differs from image src scheme
WordPress Trac
noreply at wordpress.org
Wed Dec 16 20:33:23 UTC 2015
#35045: Responsive images not added when effective scheme differs from image src
scheme
-------------------------------------------------+-------------------------
Reporter: webaware | Owner:
Type: defect (bug) | johnbillion
Priority: normal | Status: reviewing
Component: Media | Milestone: 4.4.1
Severity: normal | Version: 4.4
Keywords: has-patch needs-testing has-unit- | Resolution:
tests https | Focuses: template
-------------------------------------------------+-------------------------
Comment (by azaozz):
Replying to [comment:21 polevaultweb]:
> Added filters for `$dirname` and `$image_baseurl`.
Don't think we should be adding filters there. That will limit the update
possibilities by "locking" us in back-compat. The
`wp_calculate_image_srcset` filter is powerful enough. If a plugin moves
all images and doesn't implement the same directory structure, it seems it
should be overriding/replacing wp_image_add_srcset_and_sizes() and/or
wp_calculate_image_srcset().
What we can try doing is check (again?) after the
`wp_calculate_image_srcset` filter if the image src matches one of the
srcset URLs. That will make it possible to set the srcset for all cases.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/35045#comment:23>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list