[wp-trac] [WordPress Trac] #35291: filters for responsive image srcset and sizes attributes
WordPress Trac
noreply at wordpress.org
Thu Sep 8 02:32:49 UTC 2016
#35291: filters for responsive image srcset and sizes attributes
-------------------------+------------------------
Reporter: Hube2 | Owner: joemcgill
Type: enhancement | Status: closed
Priority: normal | Milestone:
Component: Media | Version: 4.4
Severity: normal | Resolution: invalid
Keywords: | Focuses:
-------------------------+------------------------
Changes (by joemcgill):
* status: reviewing => closed
* resolution: => invalid
* milestone: Awaiting Review =>
Comment:
Hi @Hube2,
Apologies for the delay in responding. You're correct that WordPress
doesn't have any native support for the `<picture>` element, which is what
you would likely need to produce in order to allow your clients to display
images with different ratios depending on the viewport width. For the time
being, I suggest building custom fields, as you are doing, and use them to
build your own markup. If you ''do'' need to filter the `srcset` and
`sizes` values, you can use the `wp_calculate_image_srcset` and
`wp_calculate_image_sizes` filters.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/35291#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list