Need to specify image dimensions in WordPress?
This means you need to add a width and height to the image’s HTML or CSS. If an image does not have specified image dimensions, it will appear as an error in your GTmetrix report, and GTmetrix will even tell you the correct width and height that should be added to that image.
All you have to do is locate the image on your WordPress site, view it’s HTML, then add a width and height, like this:
<img src=”image.jpg” />
<img src=”image.jpg” width=”680″ height=”680″ />
1. Find Specify Image Dimension Errors In GTmetrix
GTmetrix only shows errors for the single page you test.
Run any page through GTmetrix and seewhich images have specify image dimension errors.
2 Copy The Image’s Width + Height From GTmetrix
Next, copy the image’s width + height (provided by GTmetrix).
3. Locate The Image On Your Website
Now we need to locate the image on your WordPress site.
The WordPress visual editor automatically specifies image dimensions for you, so there’s usually no errors for images here. However, some areas of your website might not specify image dimensions automatically (possibly page builders, sliders, widgets, and hand-coded HTML or CSS). You need to learn which area of your WordPress site is giving you the errors.
[…]
This article was written by Tom Dupuis and originally published on Tom Dupuis.