All Projects → gruntjs → Grunt Contrib Imagemin

gruntjs / Grunt Contrib Imagemin

Licence: mit
Minify PNG, JPG, GIF and SVG images.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Grunt Contrib Imagemin

Service Tools
A growing collection of convenient little tools to work with systemd services
Stars: ✭ 78 (-93.61%)
Mutual labels:  hacktoberfest
Gr Elster
A GNU Radio block that decodes packets transmitted by Elster R2S smart meters
Stars: ✭ 78 (-93.61%)
Mutual labels:  hacktoberfest
Libgui
Buttons & Co
Stars: ✭ 78 (-93.61%)
Mutual labels:  hacktoberfest
Html Project
🌎
Stars: ✭ 78 (-93.61%)
Mutual labels:  hacktoberfest
Calendar
Desktop calendar app designed for elementary OS
Stars: ✭ 78 (-93.61%)
Mutual labels:  hacktoberfest
Chakra Ui Autocomplete
An utility autocomplete UI library to use with Chakra UI
Stars: ✭ 77 (-93.69%)
Mutual labels:  hacktoberfest
Hacktoberfest 20
This repository aims to cater to all users from beginners to advanced in this Hacktober'20. Everyone will surely have a take away form this. Happy Hacktober !!
Stars: ✭ 78 (-93.61%)
Mutual labels:  hacktoberfest
Pswritecolor
Write-Color is a wrapper around Write-Host allowing you to create nice looking scripts, with colorized output.
Stars: ✭ 78 (-93.61%)
Mutual labels:  hacktoberfest
Vscode Gremlins
Gremlins tracker for Visual Studio Code: reveals invisible whitespace and other annoying characters
Stars: ✭ 78 (-93.61%)
Mutual labels:  hacktoberfest
Ayudapy
Platform to help people help people
Stars: ✭ 79 (-93.52%)
Mutual labels:  hacktoberfest
Social App
A social app for Android, using Kotlin as language and Firebase as backend
Stars: ✭ 78 (-93.61%)
Mutual labels:  hacktoberfest
Laravel Countdown
Provide an easy class easy way to get the time difference between two dates, with an extra bonus trait for eloquent
Stars: ✭ 78 (-93.61%)
Mutual labels:  hacktoberfest
Gsoc Accepted Proposals
GSoC Accepted Proposals for the year 2015 to 2020
Stars: ✭ 79 (-93.52%)
Mutual labels:  hacktoberfest
Google cursor
🍭 Cursor theme inspired on Google
Stars: ✭ 78 (-93.61%)
Mutual labels:  hacktoberfest
Bot
A Discord bot for all your needs. With memes, utilities, moderation & more, Fire is the only bot you'll need.
Stars: ✭ 79 (-93.52%)
Mutual labels:  hacktoberfest
Opentok Xamarin.forms
Vonage | TokBox | OpenTok: Video/Audio Chat library for Xamarin.Forms
Stars: ✭ 78 (-93.61%)
Mutual labels:  hacktoberfest
Erlang
Development repository for the erlang cookbook
Stars: ✭ 78 (-93.61%)
Mutual labels:  hacktoberfest
Spinnaker.github.io
spinnaker documentation site
Stars: ✭ 78 (-93.61%)
Mutual labels:  hacktoberfest
Babel Test
An opinionated library to make testing babel plugins easier.
Stars: ✭ 79 (-93.52%)
Mutual labels:  hacktoberfest
Booster.js
The speed and performance optimizier for your website, delivering fast web experiences to users.
Stars: ✭ 1,215 (-0.41%)
Mutual labels:  hacktoberfest

grunt-contrib-imagemin Build Status: Linux Build Status: Windows

Minify images using imagemin

Install

npm install --save-dev grunt-contrib-imagemin

Usage

const mozjpeg = require('imagemin-mozjpeg');

grunt.initConfig({
    imagemin: {
        static: {
            options: {
                optimizationLevel: 3,
                svgoPlugins: [{removeViewBox: false}],
                use: [mozjpeg()] // Example plugin usage
            },
            files: {
                'dist/img.png': 'src/img.png',
                'dist/img.jpg': 'src/img.jpg',
                'dist/img.gif': 'src/img.gif'
            }
        },
        dynamic: {
            files: [{
                expand: true,
                cwd: 'src/',
                src: ['**/*.{png,jpg,gif}'],
                dest: 'dist/'
            }]
        }
    }
});

grunt.loadNpmTasks('grunt-contrib-imagemin');
grunt.registerTask('default', ['imagemin']);

Options

optimizationLevel (png)

  • Type: number
  • Default: 3

Select optimization level between 0 and 7.

The optimization level 0 enables a set of optimization operations that require minimal effort. There will be no changes to image attributes like bit depth or color type, and no recompression of existing IDAT datastreams. The optimization level 1 enables a single IDAT compression trial. The trial chosen is what OptiPNG thinks it’s probably the most effective. The optimization levels 2 and higher enable multiple IDAT compression trials; the higher the level, the more trials.

Level and trials:

  1. 1 trial
  2. 8 trials
  3. 16 trials
  4. 24 trials
  5. 48 trials
  6. 120 trials
  7. 240 trials

progressive (jpg)

  • Type: boolean
  • Default: true

Lossless conversion to progressive.

interlaced (gif)

  • Type: boolean
  • Default: true

Interlace gif for progressive rendering.

svgoPlugins (svg)

Type: Array

Customize which SVGO plugins to use. More here.

use

  • Type: Array
  • Default: [imagemin.gifsicle(), imagemin.jpegtran(), imagemin.optipng(), imagemin.svgo()]

Plugins to use with imagemin. It comes bundled with the following lossless optimizers:

These are bundled for convenience and most users will not need anything else.

concurrency

  • Type: number
  • Default: os.cpus().length

Control the maximum number of image optimizations that may be performed in parallel.

License

MIT © Sindre Sorhus

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].