WordPress.org

Make WordPress Core

Opened 2 years ago

Last modified 2 years ago

#36642 new enhancement

Add function to generate `image-set` attribute

Reported by: dbaker Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 4.6
Component: Media Keywords:
Focuses: Cc:

Description

This is a follow-up to #33641.

It would be great to have a function that we can use to generate a image-set attribute, to support responsive images as background's on elements.

See: https://drafts.csswg.org/css-images-3/#image-set-notation See: http://caniuse.com/#search=image-set

Or this too early for such a request? It would be great to get it on the radar for the future.

Change History (1)

#1 @swissspidy
2 years ago

Or this too early for such a request? It would be great to get it on the radar for the future.

Not necessarily too early, though http://caniuse.com/#search=image-set isn't looking bright right now.

My main concern is that if it isn't needed in core itself, there's no benefit in adding such a function to WordPress. Of course plugin developers can always create such helper functions themselves if needed.

Note: See TracTickets for help on using tickets.