[wp-trac] [WordPress Trac] #50933: Lazy loading in 5.5 causes flashing of custom logo in Firefox

WordPress Trac noreply at wordpress.org
Sat Aug 22 01:47:54 UTC 2020


#50933: Lazy loading in 5.5 causes flashing of custom logo in Firefox
--------------------------+---------------------
 Reporter:  demetris      |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  5.5.1
Component:  Media         |     Version:  5.5
 Severity:  normal        |  Resolution:
 Keywords:  2nd-opinion   |     Focuses:
--------------------------+---------------------

Comment (by khag7):

 I guess I noticed that and thought it was just the page redrawing.

 It seems like the layout is shifting from before the image is loaded to
 after.

 Ticket #50367, titled "Avoid layout shifting due to images not having
 dimension attributes" seems to describe a similar situation. In that
 ticket, they describe the necessity for lazy loaded images to have a
 height and a width defined. Our site logo has that (at least on Twenty
 Twenty) but it also has CSS styles which affect the height and the width.

 My first hunch is that maybe it has something to do with the CSS styles
 being different dimensions from the width and height on the image element
 itself.

 Before I go too far down that path, though, should we just consider
 ''not'' lazy loading the site logo? If the logo is at the top, one of
 first thing shown in the vast majority of themes, it's not going to be a
 performance impact to just load it normally. If it fixes this bug, great.
 Is there a downside?

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


More information about the wp-trac mailing list