Now it is recommended to use width and height attributes on img elements. It will help to prevent viewport jumping and will support responsive aspect ratio resizing.
https://www.youtube.com/watch?v=4-d_SoCHeWE
max-width: 100%;
height: auto;
What the other user is talking about is a new feature that FINALLY uses the attributes to preserve the ratio before the image starts loading.Kinda ridiculous that we had to wait 8 years of “responsive design” before they realized that this was always supposed to happen.