---
title: "Comment by Eric Kwoka on \"Implementing image lazy loading to improve website performance using JavaScript\" | Hashnode"
description: "Or just add loading=&quot;lazy&quot; to the images. Then you don&#39;t need any css or js"
url: "https://hashnode.com/posts/implementing-image-lazy-loading-to-improve-website-performance-using-javascript/6374a8d2f81d195c0f220048/comment/6376579df0820773cfb15909"
---

[Discussion](https://hashnode.com/posts/implementing-image-lazy-loading-to-improve-website-performance-using-javascript/6374a8d2f81d195c0f220048)

Comment [Implementing image lazy loading to improve website performance using JavaScript](https://hashnode.com/posts/implementing-image-lazy-loading-to-improve-website-performance-using-javascript/6374a8d2f81d195c0f220048)

[Eric Kwoka](https://hashnode.com/@thekwoka)

[Nov 17, 2022](https://hashnode.com/posts/implementing-image-lazy-loading-to-improve-website-performance-using-javascript/6374a8d2f81d195c0f220048/comment/6376579df0820773cfb15909)

Or just add `loading="lazy"` to the images.

Then you don't need any css or js

[David Jaja](https://hashnode.com/@Daiveed)

[Nov 17, 2022](https://hashnode.com/posts/implementing-image-lazy-loading-to-improve-website-performance-using-javascript/6374a8d2f81d195c0f220048/comment/6376579df0820773cfb15909#reply-63766ba3abae2b7516a865bc)

Yeah, but using loading="lazy" isn't as flexible as using JavaScript's Intersection Observer to lazy-load images. Thanks for the feedback.👍

[Eric Kwoka](https://hashnode.com/@thekwoka)

[Nov 17, 2022](https://hashnode.com/posts/implementing-image-lazy-loading-to-improve-website-performance-using-javascript/6374a8d2f81d195c0f220048/comment/6376579df0820773cfb15909#reply-63767929abae2b7516a86716)

[David Jaja](https://hashnode.com/@Daiveed) I disagree. It's much better, as it will adjust it's behavior based on the users devices settings (data/battery saver) and current network connection.

And it works beautifully with srcset and picture element, SEO, etc.

[David Jaja](https://hashnode.com/@Daiveed)

[Nov 17, 2022](https://hashnode.com/posts/implementing-image-lazy-loading-to-improve-website-performance-using-javascript/6374a8d2f81d195c0f220048/comment/6376579df0820773cfb15909#reply-63768178f0820773cfb15d7d)

[Eric Kwoka](https://hashnode.com/@thekwoka) Well, there are a variety of ways you can implement image lazy-loading, whatever method you choose is entirely up to you.
