Security News
PyPI’s New Archival Feature Closes a Major Security Gap
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
@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
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
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
Research
Security News
Malicious npm package postcss-optimizer delivers BeaverTail malware, targeting developer systems; similarities to past campaigns suggest a North Korean connection.
Security News
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.