Open coliff opened 8 years ago
Implementing SVGO to optimize SVGs should be a no-brainer :)
the simple method is minify and remove unused data from de xml (svg), the web server ex. IIS can compress the .svg files with zip
Compressor.cs
Change supported list to:
private static readonly string[] _supported = { ".png", ".jpg", ".jpeg", ".gif", ".svg" };
Inside this method add svg option: private static string GetArguments(string sourceFile, string targetFile, bool lossy)
case ".svg": { return $"/c npx svgo \"{sourceFile}\" -o \"{targetFile}\""; }
But the user would need to have npm / npx and svgo installed for this to work
@madskristensen do you have an idea?
@markvantilburg In the vast majority of cases, they won't have those npm packages installed globally
I see the old web compiler includes node js packages for compiling less files, could that be an option for this plugin? I could not find a .exe file to compress svg files.
Love this extension for bitmap images. Would love to see support for optimising SVG built-in.