0.0.1 • Published 6 months ago
nextjs-custom-image-client v0.0.1
nextjs-custom-image-client
A custom Image component for Next.js that includes skeleton loading and error handling.
Installation
npm install nextjs-custom-image-client
Usage
import CustomImage from 'nextjs-custom-image-client';
function MyComponent() {
return (
<CustomImage
src="/path/to/image.jpg"
alt="My image"
srcNoImage="/path/to/fallback.jpg"
/>
);
}
Props
src
: URL of the main imagesrcNoImage
: URL of the fallback imageobjectFit
: CSS object-fit property- All props supported by next/image
License
MIT
0.0.1
6 months ago