0.8.0 • Published 2 years ago

@assetpack/plugin-compress v0.8.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

@assetpack/plugin-compress

AssetPack plugin for compressing images using sharp.

Installation

npm install --save-dev @assetpack/plugin-compress

Usage

import { compressJpg, compressPng, compressWebp, compressAvif } from "@assetpack/plugin-compress";

export default {
  ...
  plugins: {
    ...
    compressJpg: compressJpg(),
    compressPng: compressPng(),
    compressWebp: compressWebp(),
    compressAvif: compressAvif(),
  },
};

Options

compressJpg

  • compression: Any settings supported by sharp
  • tags - An object containing the tags to use for the plugin. Defaults to { nc: "nc" }.
    • nc - The tag used to denote that the image should not be compressed. Can be placed on a folder or file.

compressPng

  • compression: Any settings supported by sharp
  • tags - An object containing the tags to use for the plugin. Defaults to { nc: "nc" }.
    • nc - The tag used to denote that the image should not be compressed. Can be placed on a folder or file.

compressWebp

  • compression: Any settings supported by sharp
  • tags - An object containing the tags to use for the plugin. Defaults to { nc: "nc" }.
    • nc - The tag used to denote that the image should not be compressed. Can be placed on a folder or file.

compressAvif

  • compression: Any settings supported by sharp
  • tags - An object containing the tags to use for the plugin. Defaults to { nc: "nc" }.
    • nc - The tag used to denote that the image should not be compressed. Can be placed on a folder or file.
0.8.0

2 years ago

0.7.0

2 years ago

0.6.2

2 years ago

0.5.0

2 years ago

0.4.0

2 years ago

0.6.1

2 years ago

0.3.4

2 years ago

0.6.0

2 years ago

0.5.1

2 years ago

0.3.3

2 years ago

0.3.2

2 years ago

0.3.1

2 years ago

0.3.0

2 years ago

0.2.1

2 years ago

0.2.0

2 years ago

0.1.0

2 years ago