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

@parcel/transformer-image

Package Overview
Dependencies
Maintainers
1
Versions
752
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@parcel/transformer-image

  • 2.13.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
269K
decreased by-10.11%
Maintainers
1
Weekly downloads
 
Created

What is @parcel/transformer-image?

@parcel/transformer-image is a Parcel plugin that allows you to transform and optimize images in your web projects. It supports various image formats and provides functionalities such as resizing, converting formats, and optimizing images for better performance.

What are @parcel/transformer-image's main functionalities?

Image Resizing

This feature allows you to resize images to specified widths. The code sample demonstrates how to configure the transformer to resize images to widths of 300, 600, and 1200 pixels.

module.exports = {
  "transformers": {
    "*.{png,jpg,jpeg}": [
      "@parcel/transformer-image"
    ]
  },
  "transformer": {
    "@parcel/transformer-image": {
      "sizes": [
        300, 600, 1200
      ]
    }
  }
};

Image Format Conversion

This feature allows you to convert images to different formats such as WebP and AVIF. The code sample shows how to configure the transformer to convert images to WebP and AVIF formats.

module.exports = {
  "transformers": {
    "*.{png,jpg,jpeg}": [
      "@parcel/transformer-image"
    ]
  },
  "transformer": {
    "@parcel/transformer-image": {
      "formats": {
        "webp": true,
        "avif": true
      }
    }
  }
};

Image Optimization

This feature allows you to optimize images by setting the quality level. The code sample demonstrates how to configure the transformer to optimize images with a quality setting of 80.

module.exports = {
  "transformers": {
    "*.{png,jpg,jpeg}": [
      "@parcel/transformer-image"
    ]
  },
  "transformer": {
    "@parcel/transformer-image": {
      "quality": 80
    }
  }
};

Other packages similar to @parcel/transformer-image

FAQs

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

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