Socket
Socket
Sign inDemoInstall

@types/imagemin-webp

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/imagemin-webp

TypeScript definitions for imagemin-webp


Version published
Weekly downloads
19K
increased by16.18%
Maintainers
1
Weekly downloads
 
Created
Source

Installation

npm install --save @types/imagemin-webp

Summary

This package contains type definitions for imagemin-webp (https://github.com/imagemin/imagemin-webp#readme).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/imagemin-webp.

index.d.ts

import { Plugin } from "imagemin";

/**
 * WebP imagemin plugin
 */
export default function imageminWebp(options?: Options): Plugin;

export type Preset = "default" | "photo" | "picture" | "drawing" | "icon" | "text";
export interface Resize {
    width: number;
    height: number;
}

export interface Crop extends Resize {
    x: number;
    y: number;
}

export type Metadata = "all" | "none" | "exif" | "icc" | "xmp";

export interface Options {
    /**
     * Preset setting.
     * @default default
     */
    preset?: Preset | undefined;
    /**
     * Set quality factor between 0 and 100.
     * @default 75
     */
    quality?: number | undefined;
    /**
     * Set transparency-compression quality between 0 and 100.
     * @default 100
     */
    alphaQuality?: number | undefined;
    /**
     * Specify the compression method to use,
     * between 0 (fastest) and 6 (slowest).
     * This parameter controls the trade off between encoding speed
     * and the compressed file size and quality.
     * @default 4
     */
    method?: number | undefined;
    /**
     * Set target size in bytes.
     */
    size?: number | undefined;
    /**
     * Set the amplitude of spatial noise shaping between 0 and 100.
     * @default 80
     */
    sns?: number | undefined;
    /**
     * Set deblocking filter strength between 0 (off) and 100.
     */
    filter?: number | undefined;
    /**
     * Adjust filter strength automatically.
     * @default false
     */
    autoFilter?: boolean | undefined;
    /**
     * Set filter sharpness between 0 (sharpest) and 7 (least sharp).
     * @default 0
     */
    sharpness?: number | undefined;
    /**
     * Encode images losslessly.
     * @default false
     */
    lossless?: boolean | undefined;
    /**
     * Encode losslessly with an additional lossy pre-processing step,
     * with a quality factor between
     * 0 (maximum pre-processing) and 100 (same as lossless).
     * @default 100
     */
    nearLossless?: number | undefined;
    /**
     * Crop the image.
     */
    crop?: Crop | undefined;
    /**
     * Resize the image. Happens after crop.
     */
    resize?: Resize | undefined;
    /**
     * A list of metadata to copy from the input to the output if present.
     */
    metadata?: Metadata | Metadata[] | undefined;
}

Additional Details

  • Last updated: Tue, 07 Nov 2023 03:09:37 GMT
  • Dependencies: @types/imagemin

Credits

These definitions were written by Brett M, and Piotr Błażejewicz.

FAQs

Package last updated on 07 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