Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Grunt plugin to rasterize SVG to PNG images using PhantomJS
JavaScript
branch: master

This branch is 14 commits ahead, 17 commits behind dbushell:master

Merge pull request #2 from thomaswelton/1-fix-tmpdir-access

Use random filenames for tmp files
latest commit 6ff281e54b
@Chaptykov authored

README.md

grunt-svg2png

Grunt plugin to rasterize SVG to PNG images using PhantomJS

Getting Started

This plugin requires Grunt ~0.4.1

// Gruntfile.js configuration
grunt.loadNpmTasks('grunt-svg2png');

grunt.initConfig({
    svg2png: {
        all: {
            // specify files in array format with multiple src-dest mapping
            files: [
                // rasterize all SVG files in "img" and its subdirectories to "img/png"
                { src: ['img/**/*.svg'], dest: 'img/png/' },
                // rasterize SVG file to same directory
                { src: ['img/logo.svg'] }
            ]
        }
    }
});

This task works well between SVGO Grunt and Grunt ImageOptim!


Created by David Bushell | @dbushell

Copyright © 2013 David Bushell | MIT license

Something went wrong with that request. Please try again.