Socket
Book a DemoInstallSign in
Socket

image-optimizer-utility

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

image-optimizer-utility

This package provides a simple utility for optimizing images for the web to improve performance using the imagemin library, along with imagemin-pngquant and imagemin-mozjpeg plugins.

latest
Source
npmnpm
Version
1.0.0
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

Image Optimizer Utility

This package provides a simple utility for optimizing images for the web to improve performance using the imagemin library, along with imagemin-pngquant and imagemin-mozjpeg plugins.

Installation

To use this package, you can install it via npm:

npm install image-optimizer-utility

This package requires the following dependencies:

  • imagemin
  • imagemin-pngquant
  • imagemin-mozjpeg

You can install these dependencies by running:

npm install imagemin imagemin-pngquant imagemin-mozjpeg

Usage

const optimizeImage = require('image-optimizer-utility');

// Provide the path to input image and output path for optimized image
optimizeImage('input/path/image.jpg', 'output/path/');

This utility function will optimize the input image and save the optimized version to the specified output path.

License

This package is licensed under the MIT License - see the LICENSE file for details.

FAQs

Package last updated on 28 Mar 2024

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