3

That would increase the amount of requests but also improve the webpage speed loading time.

Google just advice to avoid to downloading offscreen images as part of the initial page load, but what are the cost of doing it for every image?

I just made a script to transform all the images of a website, so far the overall speed has been improved but I wonder the drawbacks of this approach.

1

It depends, mostly on whether your site is served via http2 or not.

The impact of you lazy loading all your images, if you've also put the JavaScript calls at the bottom of the page is that your visitors need to download all the html and then download and process the JavaScript before any images will be loaded. Depending on the speed of their connection, and the power of their browser this might be fairly noticeable. You might therefore want to have the first few images, or those typically visible on the screen at common window sizes load normally and then lazy load the rest.

However most hosts and modern browsers all support http2 (or h2 as the Chrome Dev Console tends to report it), and this allows browsers to make significantly more parallel requests to a server, which means your images are less likely to block later markup calls to JavaScript, etc.

0

It slows your website speed, image not open properly and decrease website visitor with a large amount of space on the server.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.