Skip to content
This repository has been archived by the owner on May 16, 2024. It is now read-only.

avoidScalingImages should ignore svg that doesn't have any width #295

Open
DannyvanHolten opened this issue Jul 2, 2018 · 2 comments
Open

Comments

@DannyvanHolten
Copy link

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.

@tobli
Copy link
Member

tobli commented Jul 4, 2018

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

@mfontani
Copy link

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:

  1. what we use on the main site - a SVG + PNG sized 340x63 and put in a 190x35 img (errors)
  2. shouldn't error but does! - a SVG + PNG sized 190x35 and put in a 190x35 img (errors, but most definitely shouldn't!)
  3. shouldn't error but does! - a SVG sized 190x35 and put in a 190x35 img (errors, but most definitely shouldn't)
  4. doesn't error, yay! - a PNG sized 190x35 and put in a 190x35 img (passes)
  5. 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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants