1

I would like to know is there a way to add base64 data URL (instead of image URL) to react-image-lightbox

OR should I convert the base64 string to the image first and then add to react-image-lightbox? If so how can I convert to the image, please?

Linda Paiste
  • 38,446
  • 6
  • 64
  • 102
May Olivia
  • 145
  • 1
  • 10

1 Answers1

0

https://codesandbox.io/s/react-image-lightbox-sandbox-rzfuh

Works for me.

When you want to use base64 you just have to replace the image url with the base64 string most of the time.

Angel
  • 100
  • 8