coach
coach copied to clipboard
avoidScalingImages should ignore svg that doesn't have any width
As we use svg images on our website they autoscale to the width of the browser. They are size independent. But sitespeed sees them as scaled images. It should ignore those svg's in the score.
Hi @DannyvanHolten! Could you please provide a url for a site where you see this, as well as the version of sitespeed.io/coach you're using. I tried this on a few sites, but couldn't replicate.
Thanks, /Tobias
We're being bit by this on our main site, but have provided a separate easier to test page which exhibits this issue.
See https://www.theregister.com/Design/page/sitespeedio_bug.html
In it, there are five test cases:
- what we use on the main site - a SVG + PNG sized 340x63 and put in a 190x35 img (errors)
- shouldn't error but does! - a SVG + PNG sized 190x35 and put in a 190x35 img (errors, but most definitely shouldn't!)
- shouldn't error but does! - a SVG sized 190x35 and put in a 190x35 img (errors, but most definitely shouldn't)
- doesn't error, yay! - a PNG sized 190x35 and put in a 190x35 img (passes)
- errors - a PNG sized 340x63 and put in a 190x35 img (errors)
Unsure if this may help understanding what might be going wrong here.
I do wonder, though, whether the avoidScalingImages
error makes any sense for SVGs.