Konrad Podgórski - Web Developer

Personal blog about developing web applications with PHP

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