An alfred workflow to help front end developers quickly perform common tasks with svg files.
- Can use svgo to perform compression.
- Can convert an svg in to a
background-image
css property in 1 of 3 formats:- no svg encoding
- url encoded svg
- base64 encoded svg
- You will need nodejs installed globally.
Since this is for developers, some assumptions are made that you are familiar with nodejs, npm packages, and how to install them.
- Download and install svg-toolkit.alfredworkflow from the releases page.
- Right-click on the SVG Toolkit in Alfred Preferences, and select "Open in Terminal"
- Run an
npm install
in this folder to install svgo.
- Type
svg
into alfred and paste your svg markup. - Select one of the options given.