Open KyleMit opened 4 years ago
Could leverage similar strategy to #96 where we override the renderer function
Markdown-it image parser rules & renderer rules
Once we add lazy loading, need to specify image dimensions
[Intervention] An
<img>
element was lazyloaded withloading=lazy
, but had no dimensions specified. Specifying dimensions improves performance
Lighthouse brings up the suggestion to Defer offscreen images which substantially brings down Time To Interactive (TTI) on posts with images.
Native image lazy-loading for the web with
loading
attribute (caniuse)JS - Tips for rolling your own lazy loading
Optionally - When on strong network connection, and feature detect that lazy loading exists, wait for page load and the prefetch remaining images ahead of time after TTI has been met.