
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
node-imager
Advanced tools
a super simple nodejs image resizer. resize files on disk or over http / https
Prerequisites
##installation
$ npm install node-imager --save
##usage basic usage example:
const express = require('express');
const imager = require('node-imager');
const app = express();
app.get('/imager/', (req, res) => {
// node-imager will try to find this image relative the root of your application
// absolute file paths or urls work too
const url = 'http://i.imgur.com/1KDwL1M.png';
const options = {
width: 500,
height: 500,
format: 'c',
url
};
// crop image
imager.resizeWith(options, (contentType, imageBuffer) => {
res.setHeader('Content-Type', contentType);
res.send(imageBuffer);
});
});
app.listen(3000);
##api
option (String): 'c' - crops the image from the center outwards.
'' - for normal resizing
width (Number): desired width
height (Number): desired height
url (String): can be relative path or remote file on the web
'images/test.png'
'http://i.imgur.com/1KDwL1M.png' --important to prefix with 'http://'
next: callback function
(contentType, imageBuffer) => { }
resize(option, width, height, url, callback);
or
const options = {
width: 500,
height: 500,
format: 'c',
url
};
resizeWith(options, callback);
FAQs
A simple image resizer using imagemagick
The npm package node-imager receives a total of 0 weekly downloads. As such, node-imager popularity was classified as not popular.
We found that node-imager 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
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.