Whyyyy does inkscape add so much metadata to svg files?! Just opening and saving one of the icons at work makes it double in size.

I just want to scale*, move*, trim and mirror, surely there's a less crufty tool for such modifications of svg files.

(*as in actually change the coordinates of the elements, not just embedding matrix transforms in it)

I'm back dealing with this crap again.

I thought ImageMagick might be able to handle svgs. Nope. It tries, but fails partway through and just writes a broken xml file.

Show thread

@zatnosk Hmmm for very simple transformations you could just edit the file's text and have the image open to the side with a program that auto reloads it when the file changes?

@socks that's possible, but I want to transform the coordinates, and I'm _not_ going to do math to all the coordinates by hand. Especially not when it's more than a few files.

@zatnosk Oh yeah I thought you meant on like, one file. It's not really viable to do actual work like that

@zatnosk you can also save them as optimized svg in inkscape itself.

@ekaitz_zarraga how? where is that option (and why isn't that the default when opening an svg that isn't originated from inkscape?)

@ekaitz_zarraga oooh, I can save it as "regular svg", which only adds ~30% extra bytes of metadata....

@zatnosk there should be an Optimized SVG option too, that would be even smaller.

@ekaitz_zarraga hm. Couldn't find it just now, I'll have to look more into it tomorrow. But thanks! It'd be nice if I could actually use inkscape for this.

@zatnosk In my inkscape is right below compressed SVG.

But you may have that disabled IDK

@zatnosk there is an option when you save. You have to choose as if they were a different output format.

It's not the default because inkscape uses SVG as their data model. When you store everything as optimized they may lose information that is only relevant for inkscape (as layers, and so on).

@zatnosk and I guess running it through an optimiser such as svgomg isn't really a suitable workaround?

@FiXato I'm not gonna throw all our svg icons at a website / node.js tool, if I can help it.

@zatnosk oh yes, it’s such a major annoyance!

i get why they’re doing it – after all, XML being extensible like that usually is an advantage, and it makes a negligible difference for random desktop stuff. but jeez, the moment you want a more tightly optimised file for the web, i’d love the capability of saving a strictly to-spec file with zero extra crap. maybe even some serialisation options and detection for those .00001 rounding errors.

@zatnosk me, mental age 89, editing my svgs in a text editor :blobnomcookie:

Sign in to participate in the conversation

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!