Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
@parcel/transformer-image
Advanced tools
@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.
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
}
}
};
Sharp is a high-performance image processing library that allows you to resize, convert, and optimize images. It is highly configurable and supports a wide range of image formats. Compared to @parcel/transformer-image, Sharp is more versatile and can be used outside of the Parcel ecosystem.
Imagemin is a popular image optimization tool that supports various plugins for different image formats. It focuses on reducing image file sizes while maintaining quality. Imagemin can be used as a standalone tool or integrated into build processes, making it a flexible alternative to @parcel/transformer-image.
Gulp-imagemin is a Gulp plugin for image optimization using Imagemin. It allows you to integrate image optimization into your Gulp build process. While @parcel/transformer-image is specific to Parcel, gulp-imagemin is tailored for Gulp users.
FAQs
Unknown package
The npm package @parcel/transformer-image receives a total of 231,457 weekly downloads. As such, @parcel/transformer-image popularity was classified as popular.
We found that @parcel/transformer-image demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.