Konrad Podgórski Web Developer / Software Architect

Place where I used to write about code related things. Currently umaintained.

Batch conversion SVG to PNG using ImageMagick

Please keep in mind that this post was written more than 2 years ago and might be outdated.

This post is for my personal reference I will improve it in future.

Create 2 folders in project web root:

images/svg images/png

Navigate to images/svg and run

for filename in `find . -regex ".*.svg"`; do `convert -background none $filename ../png/$filename.png` ; done

Now each file that used to be in a svg format has copy in images/png with suffix .png

on

Find this post helpful? Spread the word, thanks.

Comments