[wp-trac] [WordPress Trac] #35291: filters for responsive image srcset and sizes attributes
WordPress Trac
noreply at wordpress.org
Sun Jan 3 02:49:57 UTC 2016
#35291: filters for responsive image srcset and sizes attributes
-------------------------+------------------------------
Reporter: Hube2 | Owner: joemcgill
Type: enhancement | Status: reviewing
Priority: normal | Milestone: Awaiting Review
Component: Media | Version: 4.4
Severity: normal | Resolution:
Keywords: | Focuses:
-------------------------+------------------------------
Changes (by joemcgill):
* keywords: responive image alternates =>
* owner: => joemcgill
* status: new => reviewing
Comment:
Hi @Hube2,
Thanks for the request. I may be misunderstanding, but it sounds like
you're trying to implement the [https://usecases.responsiveimages.org
/#art-direction art direction use case], which is where you would use
different crops and/or aspect ratios at specific breakpoints, rather than
different sizes of the same image. Is that correct?
If so, then `srcset` and `sizes` attributes on an `<img>` element aren't
really the right tool for the job. Instead, you'll want to use the
`<picture>` element, where you can specify a set of sources at different
breakpoints.
It I'm misunderstanding, could you give an example of the markup you'd
like to be able to produce?
Thanks,
Joe
--
Ticket URL: <https://core.trac.wordpress.org/ticket/35291#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list