[wp-trac] [WordPress Trac] #21389: Retina theme custom headers
WordPress Trac
noreply at wordpress.org
Tue Dec 23 21:17:00 UTC 2014
#21389: Retina theme custom headers
-----------------------------+-----------------------------
Reporter: nacin | Owner: Otto42
Type: feature request | Status: assigned
Priority: normal | Milestone: Future Release
Component: Customize | Version:
Severity: normal | Resolution:
Keywords: | Focuses:
-----------------------------+-----------------------------
Comment (by Otto42):
Unfortunately, the browser support still isn't quite there.
The picture tag and the srcset element offer the way forward here, because
with these, having to use JS to select the displayed image is not
necessary, you can specify all of them and have the browser choose, even
dynamically.
Currently, only Chrome really offers this full support:
http://caniuse.com/picture
Doing this in a plugin is possible, but would need the theme to support it
as well, because of the current usage of `get_header_image()`. New
functions (like `get_header_image_tag()`) would provide themes the means
to have core output the new image tags (and/or CSS) needed to provide the
responsive header image. The theme shouldn't have to know how it works to
make it happen, it should just-work.
Still, this is a decent candidate for one of the next few releases.
Note that while making "fixed-size" header images responsive is relatively
easy, flexible width images still needs a bit of thinking. It might be
reasonable simply to provide a variety of various image sizes at some
breakpoints, then let the browser choose amongst them for the full set of
the available images. If this is done, then the difference between "fixed"
and "flexible" kind of disappears, since you could do this for any image.
However, themes may desire to set those breakpoints themselves. An
analysis of various existing theme methods for showing header images may
be in order to find out the right way.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/21389#comment:16>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list