I was working with an SVG on a website and when it was sized down too small it became pixelated.
Root Cause
The problem is as the graphic becomes smaller there are less pixels to work with. When rendering the SVG the browser is using equations to determine pixels but the equations result in numbers that fall in between pixels.
Solution
It seems the solution is to set the desired size of your SVG in your editing program and then make certain all of your pixels align to the grid. This will still allow your SVG to scale up but will also allow it to render at the smaller size.
Other Resources
- Graphic Design Stack Exchange Quality Loss When Scaling down SVG’s
- Adobe Illustrator Help Draw pixel-aligned paths for web workflows
Leave a Reply