Watches and returns information about an image.

Usage

const imageData: ImageModel = useImage(imageKey: string);

Relevant Interfaces

interface ImageModel {
meta?: {
description?: string;
alt?: string;
photographer: string;
width?: number;
height?: number;
};
src: string;
srcset: [string, number][];
key: string;
}

Did this answer your question?