Inkscape: how to compress image in SVG?

I have a JPG image file (3000px x 1000px) which size is about 1 MB. I embedded it into Inkscape, drew vectors above the image and saved all of them into an SVG file. Now the file size is about 12 MB.

How to reduce the SVG file size, or how to save a compressed image in the SVG?


An SVG with an embeded image will always be bigger as the SVG (without embeded raster image) and the original raster image together, because SVG files are text files and have to encode the embeded images as text (base64).

In case you made the the raster image smaller in Inkscape you should rescale the original raster image and embed the smaller version instead. Otherwise you could try one of the following options:

Save as svgz

+ Reduces file size drastically. In my test, the SVGZ was nearly as small as the embeded image in original format.
+ Just one file.
Longer loading/saving time (but not that much).
Some browsers cannot open SVGZ files.

Don’t embed the raster image, link it

+ Small(est) SVG file.
SVG and raster image must be kept together.

Save as PDF

+ Compression nearly as good as SVGZ.
+ PDF is widely supported.
Loss of Inkscape specific data, for instance guide lines, grids, and so on.

Source : Link , Question Author : Ivan Z , Answer Author : Socowi

Leave a Comment