A SVG file can be compressed to reduce the file size (about 1/3 is reduced for a simple SVG file) without losing quality. Let’s check how to do that.
Occompress
ocompress.com/svg is an versatile online SVG compressor (The site can also compress images, videos, and documents). It reduces the size of your SVG image by below methods without losing the original quality:
- Remove unnecessary information, like unused classes, hidden objects, ect.
- Optimize tag attributes, like replacing frequent attributes with CSS.
- Oprimize the editing, like it may optimize the
d
attribute data ofpath
element.
It provides 3 algorithms for you to choose:
- compress-online.com/compress-svg (The default one, seems the compress effect is better)
- aconvert.com
- compress.com/compress-svg.html
The useage is simple:
- Drop or upload images (Up to 100 images, 40MB each)
- Then the compression will be automatically started
- Download the minimized SVG file.
Resource
- processing.compress-or-die.com
The compress effect is similar to ocompress.com/svg.
It also support SVG URL or Base64 data URL besides uploading your SVG file.