-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Optimizing Icons
Alex Canales edited this page Dec 22, 2024
·
2 revisions
Optimizing SVGs is essential for improving performance, ensuring faster load times, and reducing file sizes. It helps clean up unnecessary code, making the SVG easier to maintain and more compatible across browsers and devices.
Go to SVGOMG. This tool helps simplify and optimize SVG files.
- Click Open SVG and select the file you want to optimize.
- Alternatively, paste the SVG code directly into the input box.
In the Features section, enable all options except the following:
- Remove xmlns
- Round/rewrite number lists
- Replace duplicate elements with lists
The SVG will automatically update based on your configuration.
- Click Download to save the optimized SVG file.
- Alternatively, copy the optimized SVG code directly from the interface.
- Open the SVG file in a text editor.
- Remove any empty fills or strokes (e.g.,
fill=""
orstroke=""
). - Ensure there is an empty line at the end of the file to maintain formatting consistency.
Your SVG is now optimized and ready to use!
- What Icons Do We Accept?
- Requesting an Icon
- Overview on Submitting Icons
- Full Example of Submitting Icons
- Recommended Resources and Tools
- About the Maintainers, Supporters, and Contributors
- Code of Conduct
- Naming Conventions
- Organizing SVGs
- SVG Standards
- SVG Versions
- Updating
devicon.json
- Common Bugs and Solutions