Are vector or pixel images smaller files?

Short answer: for the type images I often draw (diagrams), vector images are often a good choice, and they have pretty small file sizes (while also having higher quality!)

But the full answer: It Depends.

The raw vector files of all vector-based images must always be saved for future edits. Here we discus the file formats for using and sharing the images.

Vector-Based


File size depends on the number of objects and points.

Pixel-Based


File size depends on the number pixels, ie. the dimensions & resolution.

Examples:

Image


Structure


SVG file size


PNG file size


Conclusion


13 vector objects.

SVG file size:

0.008 MB

PNG file size:

0.031 MB

at 3.2inX1.75in@300ppi

Conclusion:

For most graphs, the vector image is smaller, and more importantly, it looks better. A mathematical line isn't made of pixels, it's a perfect object, and so are the lines in a vector image!


1,200 vector objects.

SVG file size:

0.15 MB

PNG file size:

0.25 MB

at 3.4inX2in@300ppi

Conclusion:

Diagrams are usually a small size in both vector and pixel formats, and the vector images look great!


34,000 vector objects! (2 for every gene in human genome!)

SVG file size:

4.1 MB

PNG file size:

0.09 MB

at 4inX4in@300ppi

Conclusion:

Even though vector is usually the best format for graphs, graphs with a million points can be too much for some computers to process, so save as pixel-based files.


17,000 vector objects

>3 million points

SVG file size:

35.5 MB

PNG file size:

0.85 MB

at 6.5inX4in@300ppi

Conclusion:

Detailed maps sometimes include a vector object for every boulder on the coastline. This can make the vector files enormous.

Other maps have been simplified such that vector files work great.


52,000 vector objects

SVG file size:

13.5 MB

PNG file size:

1.2 MB

at 6.5inX3.6@300ppi

Conclusion:

Some regular vector drawings just have a lot of little vectors, and pixel versions of it are best.


SVG file size:

7.5 MB

PNG file size:

0.4 MB

at 2.7inX4.5in@300ppi

Conclusion:

Beware of crappy stock images. This tree was not very professionally made, and had twice as many spurious objects as it needed. I should have guessed because of the squished root system before I paid for it...

Kate Baldwin