Mario-Duarte / react-image-zooom

Simple React component that will allow users to zoom in on your images, perfect for product images and galleries!
https://mario-duarte.github.io/react-image-zooom/
27 stars 7 forks source link

Detect when the image can't be loaded #5

Closed cstffx closed 1 year ago

cstffx commented 1 year ago

It could be useful have access to the onError event to catch situations when the image can't be loaded and then show an alternative content if needed.

Mario-Duarte commented 1 year ago

It could be useful have access to the onError event to catch situations when the image can't be loaded and then show an alternative content if needed.

Thanks for the feedback, this may be something I will consider to add.

Mario-Duarte commented 1 year ago

It could be useful have access to the onError event to catch situations when the image can't be loaded and then show an alternative content if needed.

This has now been implemented in the latest version -> https://github.com/Mario-Duarte/react-image-zooom/releases/tag/1.2.0