
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
@forward-software/gulp-sharp
Advanced tools
Custom plugin for gulp toolkit to convert images using sharp library
Custom plugin for gulp toolkit to convert images using
sharp
library.
Install this plugin and the required peer dependencies
$ npm install --save-dev gulp sharp @forward-software/gulp-sharp
Each exported plugin can handle all formats supported by sharp
.
[!NOTE] Unsupported files are ignored and passed through.
Convert images to JPEG format
import gulp from 'gulp';
import { jpeg as gulpJpeg } from "@forward-software/gulp-sharp";
export default () => (
gulp.src('src/image.jpg')
.pipe(gulpJpeg({ quality: 90 }))
.pipe(gulp.dest('dist'))
);
options.extensions
, Array of file extensions to convert, if not specified the following will be used: ["avif", "gif", "jpg", "jpeg", "png", "svg", "tif", "tiff", "webp"]
.sharp
jpeg
method.Convert images to PNG format
import gulp from 'gulp';
import { png as gulpPng } from "@forward-software/gulp-sharp";
export default () => (
gulp.src('src/image.jpg')
.pipe(gulpPng({ palette: true }))
.pipe(gulp.dest('dist'))
);
options.extensions
, Array of file extensions to convert, if not specified the following will be used: ["avif", "gif", "jpg", "jpeg", "png", "svg", "tif", "tiff", "webp"]
.sharp
png
method.Convert images to TIFF format
import gulp from 'gulp';
import { tiff as gulpTiff } from "@forward-software/gulp-sharp";
export default () => (
gulp.src('src/image.jpg')
.pipe(gulpTiff({ quality: 90 }))
.pipe(gulp.dest('dist'))
);
options.extensions
, Array of file extensions to convert, if not specified the following will be used: ["avif", "gif", "jpg", "jpeg", "png", "svg", "tif", "tiff", "webp"]
.sharp
tiff
method.Convert images to WebP format
import gulp from 'gulp';
import { webp as gulpWebp } from "@forward-software/gulp-sharp";
export default () => (
gulp.src('src/image.jpg')
.pipe(gulpWebp({ preset: "drawing" }))
.pipe(gulp.dest('dist'))
);
options.extensions
, Array of file extensions to convert, if not specified the following will be used: ["avif", "gif", "jpg", "jpeg", "png", "svg", "tif", "tiff", "webp"]
.sharp
webp
method.MIT
Made with ✨ & ❤️ by ForWarD Software and contributors
FAQs
Custom plugin for gulp toolkit to convert images using sharp library
We found that @forward-software/gulp-sharp demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers 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.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.