
Product
Reachability for Ruby Now in Beta
Reachability analysis for Ruby is now in beta, helping teams identify which vulnerabilities are truly exploitable in their applications.
@empellio/image-optimizer
Advanced tools
Server-side image optimization middleware for Node.js (inspired by the Next.js Image API). Sharp-powered resizing, format conversion (AVIF, WebP, JPEG, PNG), HTTP cache headers, and pluggable caching (memory, disk, Redis).
Server-side image optimization library (inspired by the Next.js Image API).
npm i @empellio/image-optimizer sharp got
import express from "express";
import { createImageOptimizer } from "@empellio/image-optimizer";
const app = express();
const optimizer = createImageOptimizer({
cache: { type: "disk", path: "./.cache/images", ttl: 60 * 60 * 24 },
formats: ["webp", "avif", "jpeg", "png"],
maxWidth: 4000,
maxHeight: 4000,
defaultQuality: 80,
});
app.use("/image", optimizer.express());
app.listen(3000);
import Fastify from "fastify";
import { createImageOptimizer } from "@empellio/image-optimizer";
const fastify = Fastify();
const optimizer = createImageOptimizer();
fastify.register(optimizer.fastify(), { prefix: "/image" });
fastify.listen({ port: 3000 });
GET /image?url=https://example.com/photo.jpg&w=800&h=600&fit=crop&format=webp&quality=80
url: source image (URL, local path, or uploaded buffer)w: target width (optional)h: target height (optional)fit: cover | contain | fill | inside | outside | crop (default: cover)format: webp | avif | jpeg | png (default: keep original)quality: 1–100 (default: 80)crop: smart (attention-based) or center (default)bg: background color (used when flattening transparent images)blur: blur radius (e.g., for placeholders)grayscale: convert to grayscalerotate: rotation in degrees (e.g., 90, 180)placeholder: blur to generate a 10px blurred placeholderimport { createImageOptimizer } from "@empellio/image-optimizer";
const optimizer = createImageOptimizer();
const result = await optimizer.process({ buffer, format: "webp", w: 300 });
npm run test
npm run build
npm run demo:express → http://localhost:3001npm run demo:fastify → http://localhost:3002# run demo servers
npm run demo:express
npm run demo:fastify
FAQs
Server-side image optimization middleware for Node.js (inspired by the Next.js Image API). Sharp-powered resizing, format conversion (AVIF, WebP, JPEG, PNG), HTTP cache headers, and pluggable caching (memory, disk, Redis).
We found that @empellio/image-optimizer 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.

Product
Reachability analysis for Ruby is now in beta, helping teams identify which vulnerabilities are truly exploitable in their applications.

Research
/Security News
Malicious npm packages use Adspect cloaking and fake CAPTCHAs to fingerprint visitors and redirect victims to crypto-themed scam sites.

Security News
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.