Modern responsive image component for React apps
Integrate dynamic image transformations, blur-up placeholders, and art direction into Single Page Apps and React frameworks (Vite, Remix, Gatsby, Astro).
Install
$ npm install @smallpict/reactImplementation example
import { SmallPictImage } from '@smallpict/react';
export function ProductHero() {
return (
<SmallPictImage
src="https://my-bucket.s3.amazonaws.com/camera.jpg"
alt="Pro Mirrorless Camera"
width={800}
height={500}
format="auto" // Auto-selects AVIF or WebP based on browser support
quality={85}
placeholder="blur"
className="rounded-2xl shadow-xl"
/>
);
}Integration steps
Install package
Run npm install @smallpict/react in your React project.
Configure SmallPictProvider
Wrap your application root with your API Key / CDN domain.
Drop in SmallPictImage
Replace plain img tags with SmallPictImage.
Key benefits
- Automatic picture tag with AVIF/WebP/PNG fallbacks
- Built-in IntersectionObserver lazy loading
- Reserves the image size, so the layout doesn't shift
- Small bundle
Need complete implementation guides & API specs?
Explore parameter references, authentication mechanisms, error codes, and local testing instructions in our official React component SDK developer guide.
Read React component SDK DocsSpeed Up Your React component SDK Image Pipeline
Try AVIF and WebP image optimization in your application. No setup fee, and sandbox keys right away.