[wp-trac] [WordPress Trac] #50933: Lazy loading in 5.5 causes flashing of custom logo in Firefox
WordPress Trac
noreply at wordpress.org
Sun Aug 23 06:40:24 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 demetris):
Replying to [comment:7 khag7]:
Thanks for investigating and for confirming!
> 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?
I think the same.
It seems to me the best thing we can do is to just stop adding the
`loading` attribute to the custom logo.
We can do that by adding `'loading' => false` to the array of attributes
we pass to `wp_get_attachment_image()` in `get_custom_logo()`.
As it is now, we do something that is not needed and that we get no
benefit from doing. That is, we ask the browser to decide whether to lazy
load an image that:
1. We know should be in the initial viewport
2. We know should also be in the browser cache for subsequent visits and
subsequent views
The only thing we get in return is that we trigger a jarring UX in
Firefox.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/50933#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list