Download this extension on the Chrome Web store or in the Add-On Marketplace for Firefox.
SVG Gobbler is a simple browser extension that finds SVG content in your current window and lets you download, copy to clipboard, or export as a PNG.
Currently, if you would like to modify this extension you will need to install it manually. Before making edits you will need to build it locally and side load SVG Gobbler as a developer extension to test any changes.
- Clone the repo
cd svg-gobbler
- Run
npm install
to install necessary dependencies
npm install
- Run
npm start
to tell Webpack to build files into thepublic/extension/dist
folder. This also tells webpack to watch for edits.
npm start
- Open Chrome
- In the address bar, navigate to
chrome://extensions
- In the top right of the screen, flip the toggle to enable
Developer Mode
- Click the button to
Load unpacked
and select thepublic/extension
folder inside the SVG Gobbler repo
Once this is complete you can start hacking. Editing content in the src
directory will automatically build and update the extension folder which will feed the extension in the browser the latest code.
Click the SVG Gobbler extension icon to search the current page for SVGs.
Unique attributes for each SVG element will be shown within the card. The attributes currently being shown are:
-
If the SVG is placed as a:
- background image
- image source
- inline svg
- object data
- sprite
- symbol
-
The size of the SVG in the DOM
Feel free to submit a pull request if you've made an improvement of some kind. This is a small hobby project and I'm not very good at javascript.
This started as a pet project to improve the SVG Crowbar tool that is no longer being maintained by NY Times. It has come a long way since then but I always appreciated the simplistic approach they started and it's nice to pay homage.