DriveLoader Logo
DriveLoaderv1.2.0
Docs/Next.js & React 19 Integration

Next.js & React 19 Integration

Custom image loader helper, Edge runtime, Server Actions, and React Suspense.

Overview

DriveLoader perfectly integrates into Next.js App Router. Use createDriveNextLoader() to let Next.js Image component handle Drive links.

Code Example

nextjs-react19.tsx
1import Image from 'next/image';
2import { createDriveNextLoader } from '@driveloader/react';
3
4const driveLoader = createDriveNextLoader();
5
6export function ProfileImage({ src }: { src: string }) {
7 return <Image loader={driveLoader} src={src} alt="Next" width={300} height={300} />;
8}

Best Practices

  • Always pass explicit width and height when using Next.js Image.

Related APIs