fannypack-images
Official Fannypack task for minifying images for production.
Installation
npm install fannypack-images --save-dev
Usage
var Fannypack = require('fannypack')
require('fannypack-images')
Fannypack.Config.images = {
src: 'img',
dest: 'assets/img',
watchTask: true,
assetTask: true,
flatten: true,
extensions: ['jpg', 'png', 'svg', 'gif']
}
Fannypack.init()
Flattening
If set to true, images within src/assets/img/home/*.jpg
, src/assets/img/app/*.jpg
and src/assets/img/*.jpg
will ALL be merged into build/assets/img/*.jpg
without retaining the subdirectories home
and app
.
If you want to keep any subdirectories, set flatten
to false
.