npm

Join us for the upcoming webinar, "Enterprise JavaScript done right: the tools you love, the security you need."Sign up here »

parcel-plugin-imagemin

3.0.0 • Public • Published

Build Status

parcel-plugin-imagemin

A parcel plugin for image minification

⚠️ Note: This Plugin does not support Node 6

Affected image formats

Currently supported extensions are .jpg, .jpeg, .png, .gif, .svg

Installation

yarn add parcel-plugin-imagemin -D

or

npm install parcel-plugin-imagemin -D

Usage

Image minification is only done on production builds so parcel build ..., this to improve rebuild speeds in dev mode (the imagemin data is cached so it should be pretty quick in prod as well)

Configuration

Configuration file used by this plugin is imagemin.config.js

module.exports = {
  "gifsicle": { "optimizationLevel": 2, "interlaced": false, "colors": 10 },
  "mozjpeg": { "progressive": true, "quality": 10 },
  "pngquant": { "quality": [0.25, 0.5] },
  "svgo": {
    "plugins": [
      { "removeViewBox": false },
      { "cleanupIDs": true },
    ]
  },
  "webp": { "quality": 10 }
}
 

See imagemin's API for further information: https://github.com/imagemin

License

MIT License

install

npm i parcel-plugin-imagemin

Downloadsweekly downloads

128

version

3.0.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability