
Product
Introducing Tier 1 Reachability: Precision CVE Triage for Enterprise Teams
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
next-squoosh
Advanced tools
A React image optimization component with automatic WebP conversion and compression
A Next.js plugin that optimizes images at build time using Squoosh library.
npm install next-squoosh
# or
yarn add next-squoosh
# or
pnpm add next-squoosh
Add the plugin to your Next.js configuration:
// next.config.js
const { withSquooshOptimizer } = require('next-squoosh');
module.exports = withSquooshOptimizer({
// Your Next.js config
}, {
// Optional: Configure the optimizer
sourceDir: 'public/assets', // Directory containing source images
outputDir: 'public/optimized', // Directory for optimized images
formats: ['webp', 'avif'], // Output formats
quality: 75, // Quality level (0-100)
});
Option | Type | Default | Description |
---|---|---|---|
sourceDir | string | 'public/assets' | Directory containing source images to optimize |
outputDir | string | 'public/optimized' | Directory where optimized images will be saved |
formats | string[] | ['webp'] | Array of output formats ('webp', 'avif') |
quality | number | 75 | Quality level for optimization (0-100) |
Given an image at public/assets/hero.jpg
, the plugin will create:
public/optimized/hero-webp-q75.webp
public/optimized/hero-avif-q75.avif
(if AVIF format is enabled)MIT
FAQs
A React image optimization component with automatic WebP conversion and compression
We found that next-squoosh 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
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
Research
/Security News
Ongoing npm supply chain attack spreads to DuckDB: multiple packages compromised with the same wallet-drainer malware.
Security News
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.