[wp-trac] [WordPress Trac] #34757: Add filter, probably image_downsize, for image urls in wp_calculate_image_srcset()
WordPress Trac
noreply at wordpress.org
Sat Nov 21 03:53:12 UTC 2015
#34757: Add filter, probably image_downsize, for image urls in
wp_calculate_image_srcset()
--------------------------+------------------------------
Reporter: klihelp | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Media | Version: trunk
Severity: normal | Resolution:
Keywords: | Focuses:
--------------------------+------------------------------
Comment (by joemcgill):
Hi @klihelp,
`wp_calculate_image_srcset()` contains it's own filter, named
'wp_calculate_image_srcset', which can be used to modify the URLs of
images included in the `srcset` attribute. The filter passes each source
as an array containing the URL, the descriptor value (the image width in
pixels), and a character representing the descriptor type (i.e., 'w').
--
Ticket URL: <https://core.trac.wordpress.org/ticket/34757#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list