Page speed suggests to give image height and width for the images , can someone please tell me what are the advantages of specifying the height and width for the image.
Normally we always give the url of the image in the src tag and always forgets to specify the width and height.
By specifying the width and height ahead of time, the browser renders all the elements in their place and size on the page the first pass through. If you don’t specify the sizes, it has to download the file before knowing them, and then it has to re-render all the components on the page, which takes time. It also makes for a less smooth experience for the user.