Skip to main content

ImageWithFallback

Display an image, with a fallback image if the first one fails to load.

Props

  • src = {string}
  • fallbackSrc = {string}

Example with code

import ImageWithFallback from '@components/ImageWithFallback';

const MyComponent = () => {
return (
<ImageWithFallback src="https://d2klab.github.io/explorer/image.png" fallbackSrc="https://d2klab.github.io/explorer/fallback.png" />
);
};