
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.
Image serving/resizing/optimizing Express/Connect middleware using sharp/libvips.
diminutive for image in croatian
Image serving/resizing/optimizing Express/Connect middleware using sharp/libvips.
Intended for usage behind a proxy cache (e.g. nginx, varnish) or a CDN (e.g. CloudFlare) as it doesn't cache results on its own.
npm add slicica
Installing this module will automatically fetch and build libvips and its dependencies on Linux, MacOS and Windows x64.
For more information read sharp's documentation.
app.use(require('slicica')(options))
const app = express()
const slicica = require('slicica')
app.use(
slicica(
// default options below
{
prefix: '/', // url prefix on which to serve the images
root: '', // root folder / prefix to prepend to the requested image (path where the images reside)
maxAge: 0, // takes seconds as integer || ms compatible string || false to disable
progressive: false, // progressive scan for JPG and PNG
quality: 80, // output quality for jpeg, webp, png, tiff
compression: 6, // image compression level (0-9)
etag: true, // generate and send the ETag header
lastModified: true, // send the Last-Modified header
cache: false, // options passed to sharp.cache
concurrency: 0, // number of threads sharp will use (0 resets it to default = number of cores)
contentTypes: ['image/jpeg', 'image/png', 'image/webp', 'image/tiff'], // content types to serve, other requests are ignored
},
),
)
http://localhost:####/images/random.jpg?w=800
http://localhost:####/images/random.jpg?h=600
http://localhost:####/images/random.jpg?w=300&h=200&g=north
w // width
h // height
g = 'center' // gravity (north|northeast|east|southeast|south|southwest|west|northwest|center|centre)
if (w && h) {
// crops to exact dimensions using the default or specified gravity
} else if (w || h) {
// resizes preserving the aspect ratio
} else {
// just pipes the original image as response
}
MIT © Stipe Kotarac (https://github.com/kotarac)
FAQs
Image serving/resizing/optimizing Express/Connect middleware using sharp/libvips.
The npm package slicica receives a total of 4 weekly downloads. As such, slicica popularity was classified as not popular.
We found that slicica demonstrated a healthy version release cadence and project activity because the last version was released less than 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
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.