-
-
Notifications
You must be signed in to change notification settings - Fork 362
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cleanup SVGs #814
Comments
Yeah, but this is the task of each contributor. (To remove that info.) However, I've found out you can workaround the problem if you use relative paths there, I.e. |
Workaround is utterly unnecessary as this may be simply removed and not introduced again. |
Then this is an issue you should raise in the Inkscape issue tracker. Here we can nothing do about it. As soon as you export the file, and save the file as a Inkscape SVG, Inkscape recreates this. |
Have you read entire issue text? I linked solution. |
I am having very good experience losslessly minifying SVGs with https://imageoptim.com/ which internally uses https://github.com/svg/svgo to get rid of all unnecessary data. in #817 it Saved 1,8 MB out of 12,6 MB. 14,5% overall (up to 72% per file) |
Optimizing images is fine sure. But only when this is the final image and you do not want to work with it. However, the Also, optimizing is not the solution for this problem in general. You can also just remove the export line manually in the source code. Or you just select "Normal SVG" when saving the file. (instead of Inkscape SVG) That's why I said it is the task of each contributor. When changing the file, you just have to save it in the correct format. That's it. |
Agree, if there is stuff in there that helps you edit images later then that should be preserved in source control. It seems that final image optimisation should be performed as a part of the (release) build, and optimized images discarded once the .apk is prepared. What about other image types (.png, .jpg...), do they also contain stuff that should be preserved for further edits or can these be losslessly optimised in git? If so, please accept pull request #818. |
You can surely delete |
The svgs are not included in the APK. |
:-) well then it really depends where they are used and if size matters there. |
They are used for designing the quest icons, e.g. That's the whole reason, why we should not optimize them. |
During my attempt to how one is supposed to export metadata (to fix my quest for #799) I discovered that SVGs saved by Inkscape are polluted by data that at best is useless and at worst is harmful (confuses search and may be a privacy problem for some)
I think that at least
inkscape:export-filename
should be deleted as https://github.com/westnordost/StreetComplete/blame/835eea29223a8201049083f17a263ea94abd9a37/res/appicon_flat-debug.svg#L20 and similar, with saving path to where file was stored are the most obnoxious and completely useless.But I think that opening and resaving as "Optimized SVG" with Inkscape or running https://superuser.com/questions/739525/removing-personal-data-from-svg-file/1113543#1113543 or similar SVG cleaner would be a good idea to remove also other Inkscape cruft.
The text was updated successfully, but these errors were encountered: