SEO impact on specifying image width and height for responsive website?

后端 未结 3 1473
广开言路
广开言路 2020-12-11 19:28

I was told that specifying inline width and height for all images will be good for SEO and also helps the site loads faster, like so:

3条回答
  •  鱼传尺愫
    2020-12-11 20:17

    If you do not tell the browser the size of your images then it must "build" the page not once, but twice (or more times depending on how many images you have on the page). It will build it once to display all the text, and then it will wait until an image is downloaded. When one image is downloaded the browser can now determine the size of the image and will rebuild the page to wrap the text around that image. This process will happen for every image on your page.

    If you just specify the image dimensions, it will already know the size of the images and can use that information to shape the page. It won't have to rebuild the page a million times.

提交回复
热议问题