Aspect ratio audit fails on SVG
See original GitHub issueThe image aspect ratio audit appears to fail for SVG images. If you run a “best practices” audit on the standalone HTML file in this zip (unzip it and put it on a webserver) you’ll see it includes
Does not uses Images with appropriate aspect ratio
Image displayed sizes should match their natural aspect ratio.
I’ve tried it with different combinations of width/height attributes and CSS, and none can make it pass the audit.
Issue Analytics
- State:
- Created 6 years ago
- Comments:7
Top Results From Across the Web
Google Lighthouse and SVGs with preserveAspectRatio="none"
Lighthouse reports the error: Displays images with incorrect aspect ratio. precisely because the SVG includes the preserveAspectRatio="none" ...
Read more >Displays images with incorrect aspect ratio
How the Lighthouse image aspect ratio audit fails · Ensure images display with the correct aspect ratio. Use an image CDN; Check the...
Read more >Google Lighthouse and SVGs with preserveAspectRatio="none"
Google Lighthouse has a red triangle error which significantly impacts the Best Practices score: Displays images with incorrect aspect ratio.
Read more >preserveAspectRatio - SVG: Scalable Vector Graphics | MDN
The preserveAspectRatio attribute indicates how an element with a viewBox providing a given aspect ratio must fit into a viewport with a ...
Read more >Why Lighthouse says image elements lack width and height ...
The reason? The aspect-ratio CSS property is relatively new (Edge & Chrome support since January 2021) and is a browser default property for ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks so much for volunteering @TejasQ but Peter beat you to the punch 😄 feel free to take a look at some of our other good first issues!
Thanks patrickhulce for your reply!