Image Aspect Ratio Test
What is it?
Pass rate:
-
Top 100 websites: 75%This value indicates the percent of top 100 most visited websites in the US that pass this test (in the past 12 months).
-
All websites: 60%This value indicates the percent of all websites analyzed in SEO Site Checkup (500,000+) in the past 12 months.
| 2021 | 72% |
|---|---|
| 2022 | 68% |
| 2023 | 75% |
| 2024 | 75% |
100
75
50
25
0
How do I fix it?
There are two common causes for an incorrect image aspect ratio:
- An image is set to explicit width and height values that differ from the source image's dimensions.
- An image is set to a width and height as a percentage of a variably-sized container.
To help avoid these issues, consider using an image CDN, to help automate the process of creating different size versions of your image.
Also check any CSS that can affects the image's aspect ratio - if you're having trouble finding the CSS that's causing the incorrect aspect ratio, Chrome DevTools can show you the CSS declarations that affect a given image.
Finally, check the image's width and height attributes in the HTML. When possible, it's good practice to specify each image's width and height attributes in your HTML so that the browser can allocate space for the image. This approach helps to ensure that content below the image doesn't shift once the image is loaded.