Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@assetpack/plugin-compress

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@assetpack/plugin-compress

AssetPack plugin for compressing images using sharp.

  • 0.8.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
336
increased by35.48%
Maintainers
1
Weekly downloads
 
Created
Source

@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.

FAQs

Package last updated on 17 Nov 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc