Trying to speed up my site and i run into the specify image dimensions to avoid reflow and repaints.
If i have images in divs with <div class="class"> .class img {height: xxxpx; width: xxxpx;}
Wouldn't that be the same as setting dimensions within <img class="class"> .class {height: xxxpx; width: xxxpx;}
?
Just wondering if it works the same way as im getting the specify image dimensions warning in gtmetrix.
Yes, it is the same. And, you can ignore the warning from gtmetrix.
http://gtmetrix.com/specify-image-dimensions.html
Page Speed currently only detects image dimensions that are specified via the image attributes. If you are specifying the dimensions via CSS, then you can safely ignore this recommendation.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With