
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
Optimize buffer of PNG, JPEG, GIF, SVG images.
$ npm install imgo
const fs = require('fs');
const imgo = require('imgo');
fs.readFile('image.png', (error, data) => {
imgo(data, {
pngquant : true,
optipng : true,
zopflipng : true,
pngcrush : true
}).then(optimized => {
console.log('optimized image buffer', optimized);
});
});
fs.readFile('image.jpg', (error, data) => {
imgo(data, {
jpegRecompress : true,
jpegoptim : true,
mozjpeg : true,
guetzli : true
}).then(optimized => {
console.log('optimized image buffer', optimized);
});
});
fs.readFile('image.gif', (error, data) => {
imgo(data, {
gifsicle : true
}).then(optimized => {
console.log('optimized image buffer', optimized);
});
});
fs.readFile('image.svg', (error, data) => {
imgo(data, {
svgo : true
}).then(optimized => {
console.log('optimized image buffer', optimized);
});
});
# imgo help
$ imgo --help
# apply optipng and pngquant
$ cat image.png | imgo --optipng --pngquant > optimized.png
# apply all jpeg optimizers and out diff
$ cat image.jpg | imgo --jpg --info > optimized.jpg
# apply to jpeg files
$ imgo --jpg --info *.jpg
FAQs
Optimize image buffer
We found that imgo demonstrated a not healthy version release cadence and project activity because the last version was released 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.