AssetPack plugin for compressing images using sharp.
npm install --save-dev @assetpack/plugin-compress
import { compressJpg, compressPng, compressWebp, compressAvif } from "@assetpack/plugin-compress";
export default {
...
plugins: {
...
compressJpg: compressJpg(),
compressPng: compressPng(),
compressWebp: compressWebp(),
compressAvif: 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.
- 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.
- 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.
- 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.