Security News
The Push to Ban Ransom Payments Is Gaining Momentum
Ransomware costs victims an estimated $30 billion per year and has gotten so out of control that global support for banning payments is gaining momentum.
imgopti
Advanced tools
Readme
imgopti is a tool for optimizing images.
$ [sudo] npm install imgopti -g
imgopti [file | directory]
1. -o, --output the path to save
2. -l, --lossy=<lossy value> compress images lossyly, lossy value: 0 - 100, default lossy value is 20. lossy value is bigger, images compression is bigger
3. -s '<width>' || 'x<height>' || '<width>x<height>'. resize the image in proportion
4. -f, --force do not save original image
5. -h, --help print the help page
6. -v, --version print program version
var Imgoptimizer = require('imgopti');
var opt = {
input: [], // directory or file
output: null, // output directory, if not , overwrite original file and save original file like xxx-old.xxx
matchRules: [ // image filter rules
'*.jpeg',
'*.jpg',
'*.png',
'*.gif'
],
lossy: 20, // default value: 20
size: '', // '<width>' || 'x<height>' || '<width>x<height>'. resize the image in proportion
force: 0, // overwrite original file and do not save original image
onFileProcessed: function (newFile, oldFile) { // callback when a file is processed
},
onComplete: function(count) { // callback when all files are processed
}
};
var imgopti = new Imgoptimizer(opt);
imgopti.process();
fix a problem that there is a bug when actual mimeType is not equal to the extension
FAQs
optimize images, compress, resize and so on
We found that imgopti 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
Ransomware costs victims an estimated $30 billion per year and has gotten so out of control that global support for banning payments is gaining momentum.
Application Security
New SEC disclosure rules aim to enforce timely cyber incident reporting, but fear of job loss and inadequate resources lead to significant underreporting.
Security News
The Python Software Foundation has secured a 5-year sponsorship from Fastly that supports PSF's activities and events, most notably the security and reliability of the Python Package Index (PyPI).