Open nboukeffa opened 4 years ago
@nboukeffa
actually you can use onError method to put a fallback image like you discribed:
onError: (event) => { event.target.src = "https://res.cloudinary.com/demo/image/upload/seagull.jpg"; },
@Seiphir0the No you can't the interface is defined as below
export interface CommonImageType {
src: string;
srcSet?: string | undefined;
sizes?: string | undefined;
onLoad?: (() => void) | undefined;
onError?: (() => void) | undefined;
}
Hence no input is expected
@ethanselzer can I take this issue up to resolve
Hi!
Do you know if in the current state of the library it is possible to define a default image when the original image is on error (404). I've seen that there is an
onError
property inSmallImageType
andLargeImageType
but I'm not sure how to use it since nothing is passed in parameter of it.Thanks for your help.