Another option, if your images are simple enough, is to use https://github.com/fogleman/primitive to convert it to SVG. Might not be worth the effort though as the space savings could be too insignificant to matter for the artifacts produced. Neat effect though for small amounts of shapes.