[wp-trac] [WordPress Trac] #21389: Retina theme custom headers
    WordPress Trac 
    noreply at wordpress.org
       
    Tue Dec 23 21:34:21 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 benknight):
 Given the challenges I agree with you that a plugin would be a good
 approach here.
 Some thoughts:
 Given that `get_header_image` just returns the contents of the src
 attribute, you could solve this problem by just returning the 2x image
 always.  The tradeoff here would be downloading 4 times the amount of data
 necessary for users with 1x screens.  For icons and small images, this is
 an acceptable tradeoff in my opinion, but for large header images,
 obviously it matters.
 To reiterate what was said above, if it weren't for the header image
 markup being at the theme level, it's possible to imagine a CSS-only
 approach here, which is probably more appropriate anyway since the header
 image is more design than it is actual content.  Then all you need is
 media queries.  This is how I'm doing it in my own themes.
 I would watch the `srcset` part of the Responsive Images implementation
 more closely than the `<picture>` element (http://responsiveimages.org/
 does a really good job tracking the progress), since this is really all
 you need to solve the problem.  `srcset` is pretty close: on be default in
 Chrome & Safari, behind a flag on Firefox.  Given the timing on this one I
 think it's probably a good time to start taking action on this feature
 now.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/21389#comment:17>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
    
    
More information about the wp-trac
mailing list