Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
node-imager
Advanced tools
a super simple nodejs image resizer
important: this does not support downloading images over https ... yet
Prerequisites
##installation
$ npm install node-imager --save
##usage basic usage example:
var express = require('express');
var imager = require('node-imager');
var app = express();
app.get('/imager/', function(req, res) {
var height = 150;
var width = 150;
// node-imager will try to find this image in the root of your application
// this can be a url of an image somewhere on the web as well like (http://francoislaubscher.com/img/me-square_250.png)
var url = "test.png";
// crop image
imager.resize('c', width, height, url, (contentType, imageBuffer) => {
res.setHeader('Content-Type', contentType);
res.send(imageBuffer);
});
});
app.listen(8080);
##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://francoislaubscher.com/img/me-square_250.png' --important to prefix with 'http://'
next: callback function
(contentType, imageBuffer) => { }
resize(option, width, height, url, callback);
FAQs
A simple image resizer using imagemagick
The npm package node-imager receives a total of 1 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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.