@sardine/eleventy-plugin-tinysvg

An eleventy plugin to minify and optimise SVG

Usage no npm install needed!

<script type="module">
  import sardineEleventyPluginTinysvg from 'https://cdn.skypack.dev/@sardine/eleventy-plugin-tinysvg';
</script>

README

@sardine/eleventy-plugin-tinysvg

An eleventy plugin to minify and optimise SVG

Features

Inlines SVG files and optimises it with SVGO to keep it as small as possible.

Requirements

Installation

npm install --save-dev @sardine/eleventy-plugin-tinysvg

How to use it

const tinysvg = require('@sardine/eleventy-plugin-tinysvg');
eleventyConfig.addPlugin(tinysvg, {
  baseUrl: 'site/_assets/svg/',
});

License

MIT