Back to Home

React Component SDK

Deliver perfectly optimized, lazy-loaded images in your React applications with a single component.

Quick Install

npm install @imgnodus/imgnodus-react

Usage Example

import { ImgNodusProvider, useImgNodus, ImgNodusImage } from '@imgnodus/imgnodus-react';

// 1. Wrap your app
function App() {
  return (
    <ImgNodusProvider config={{ apiKey: 'YOUR_API_KEY' }}>
      <ProfileUploader />
    </ImgNodusProvider>
  );
}

// 2. Upload and Display
function ProfileUploader() {
  const { upload, isUploading } = useImgNodus();
  
  const handleUpload = async (file) => {
    const { url } = await upload(file);
    alert('Optimized URL: ' + url);
  };

  return (
    <ImgNodusImage src="https://api.imgnodus.com/u/abc1.webp" alt="Profile" />
  );
}

Coming Soon: Advanced Features

We're working on automatic layout shift prevention and global state for image loading.

Auto-Blur placeholders
React Server Components support