Remove unnecessary lazy loading of avatars, emojis, and smilies

Merri

Member
Current XenForo 2.3 sets loading="lazy" attribute on all avatars, emojis, and smilies. Here are reasons why this attribute is unnecessary:
  1. These are small images. Loading them wasn't a problem in the late dial-up modem era of the internet.
  2. These images repeat a lot, reducing the point of loading the lazily: why load lazily an image that exists multiple times on a page?
  3. There can be a lot of these images in the first immediate view, for example on the new posts page.
  4. Lazy loading makes these images visibly blink into the page upon each page load. But when lazy loading is disabled the images are there immediately on first render.
Additionally performance measurement tools like WebPageTest do complain about having a lot of lazy loading images in the viewport.

The simplest solution is to not do lazy loading on these small images.

Benefits

Better user experience: less blinking for images that are already in cache.

Drawbacks

Biggest forums might see their bandwidth usage go up, but hard to say.
 
Upvote 2
Back
Top Bottom