
Security Fundamentals
Turtles, Clams, and Cyber Threat Actors: Shell Usage
The Socket Threat Research Team uncovers how threat actors weaponize shell techniques across npm, PyPI, and Go ecosystems to maintain persistence and exfiltrate data.
img-optimizer-react
Advanced tools
img-optimizer aims to provide a subset of [next/image](https://nextjs.org/docs/api-reference/next/image) as a framework-independent library, making it possible to integrate with your favorite tools and frameworks. img-optimizer delivers compressed images
img-optimizer aims to provide a subset of next/image as a framework-independent library, making it possible to integrate with your favorite tools and frameworks. img-optimizer delivers compressed images to the browser on demand. It prioritizes the avif format when the browser supports it, falling back to webp.
Integration examples:
Integration guide:
import express from "express";
import { createOptimizer } from "img-optimizer/server";
const app = express();
app.use(express.static("public"));
const optimize = createOptimizer({
domains: ["some.domain.com"]
});
app.get("/img-optimizer", async (req, res, next) => {
const result = await optimize({
url: req.url,
headers: req.headers,
});
const { body, status, headers } = result;
res.status(status).header(headers).send(body);
});
app.listen(3000, () => {
console.log("Listening on http://localhost:3000");
});
Simple JS:
import { createSrcSet } from "img-optimizer";
`
<img srcset="${createSrcSet("/test-8k.jpg")}" />
<img srcset="${createSrcSet("https://some.domain.com/some-image.jpg")}" />
`
With React:
import image from "./test-8k.jpg";
import { Image } from "img-optimizer-react";
export function Page() {
return (
<>
<Image
src={image}
fill
alt=""
style={{
objectFit: "contain",
background: "#cef",
}}
/>
<Image
src="https://some.domain.com/some-image.jpg"
fill
alt=""
style={{
objectFit: "contain",
background: "#cef",
}}
/>
</>
);
}
createOptimizer options:
FAQs
img-optimizer aims to provide a subset of [next/image](https://nextjs.org/docs/api-reference/next/image) as a framework-independent library, making it possible to integrate with your favorite tools and frameworks. img-optimizer delivers compressed images
We found that img-optimizer-react 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 Fundamentals
The Socket Threat Research Team uncovers how threat actors weaponize shell techniques across npm, PyPI, and Go ecosystems to maintain persistence and exfiltrate data.
Security News
At VulnCon 2025, NIST scrapped its NVD consortium plans, admitted it can't keep up with CVEs, and outlined automation efforts amid a mounting backlog.
Product
We redesigned our GitHub PR comments to deliver clear, actionable security insights without adding noise to your workflow.