0.8.0 • Published 6 months ago

@assetpack/plugin-compress v0.8.0

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months 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

6 months ago

0.7.0

10 months ago

0.6.2

1 year ago

0.5.0

1 year ago

0.4.0

1 year ago

0.6.1

1 year ago

0.3.4

1 year ago

0.6.0

1 year ago

0.5.1

1 year ago

0.3.3

1 year ago

0.3.2

1 year ago

0.3.1

1 year ago

0.3.0

1 year ago

0.2.1

1 year ago

0.2.0

1 year ago

0.1.0

1 year ago