[wp-trac] [WordPress Trac] #38559: Current header image gets clipped in the Customizer

WordPress Trac noreply at wordpress.org
Sat Oct 29 06:36:52 UTC 2016


#38559: Current header image gets clipped in the Customizer
--------------------------+------------------------------
 Reporter:  bradyvercher  |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Customize     |     Version:  3.9
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:
--------------------------+------------------------------
Changes (by bradyvercher):

 * keywords:   => has-patch


Comment:

 It turns out the Customizer attempts to use size data stored in
 `header_image_data`, but the registered default images don't have any
 sizing or attachment data, so the size is guessed before falling back to a
 default of `40` for the height. If an image exists in the browser cache,
 it tends to load fast enough that JS can determine its size, but if the
 image load event hasn't fired yet, the size is unknown. That's typically
 when the thumbnail gets clipped like [attachment:clipped-header.png].

 That being said, it looks like the code for setting the height is
 completely unnecessary and CSS could be used if a maximum height is
 desired. [attachment:38559.dff] removes the code for setting the height on
 that container.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/38559#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list