nuxt-imagemin

Nuxt plugin to minify your images
12,303 177
Install
npm install nuxt-imagemin
Latest Version:1.0.0
License:MIT
Last Updated:Jun 19, 2021
Links: GitHub  ·  npm
Maintainer: sobolevn

nuxt-imagemin

wemake.services Build Status

Nuxt module to minify your images. Works with: png, jpeg, gif, and svg.

Installation

npm install --save nuxt-imagemin

Add nuxt-imagemin to your nuxt.config.js:

{
  modules: [
    'nuxt-imagemin',
  ]
}

Usage

  1. Put your images inside assets folder, for example: logo.png
  2. Then create an element to render it: <img src="https://raw.githubusercontent.com/wemake-services/nuxt-imagemin/HEAD/~/assets/logo.png">
  3. When you will bundle your app for production, nuxt will minify your image assets

Read more about how assets work.

Options

We use imagemin plugin for webpack internally. It has a lot of options. We pass any provided options into the imagemin itself:

{
  modules: [
    ['nuxt-imagemin', {
      optipng: { optimizationLevel: 5 },
      gifsicle: { optimizationLevel: 2 }
    },
  ]
}

License

MIT.

Related Packages

@privyid/nuxt-csrf

Module CSRF for NUXT

26,088 9
mixpanel-nuxt

Mixpanel module for Nuxt

19,992 7
nuxt-radash

radash for Nuxt

10,601 20
gsap-nuxt-module

GSAP integration for Nuxt.

8,932 37
@docus/core-edge

The Docus core.

8,638

Version History

Version Released License
1.0.0 MIT
0.1.2 MIT
0.1.1 MIT
0.1.0 MIT