$ npm install staticdelivr
Image optimization
made simple.
A lightweight React component for automatic WebP/AVIF conversion, resizing, and global CDN delivery. No complex config required.
54,618+
Total Downloads
5,158+
Monthly Downloads
v1.0.0
Stable Release
Get Started in Seconds
No API keys. No build steps. Just install and import.
1. Install Package
bash
npm install staticdelivrAlso supports
yarn and pnpm2. Drop in Component
jsx
import { StaticDelivrImage } from 'staticdelivr';
export default function Page() {
return (
<StaticDelivrImage
src="https://example.com/hero.jpg"
width={800}
height={600}
alt="Optimized hero image"
/>
);
}Why use the component?
Automatic Optimization
We automatically convert images to modern formats like WebP or AVIF based on the user's browser support, often reducing file size by 60-80%.
Framework Agnostic
While it works perfectly as a drop-in replacement for next/image, it is compatible with standard React, Vite, Remix, and Gatsby.
TypeScript Ready
Written in TypeScript from the ground up. Get full autocomplete for props like quality, format, and fit.
On-the-fly Resizing
Request specific dimensions using width and height props. We process resizing at the edge before caching the result.
Ready to optimize?
Join thousands of developers using StaticDelivr to serve faster images.