The ToggleLazyLoadImage component provides the ability to toggle between two images on a click. This component depends on the React Lazy Load Image component. We are using this instead of the Next.js Image component because, for now anyway, it supports a fluid image that fills the photo grid we use showing photo albums/collections. We could not get the Next.js Image component to act fluid and properly fill its card on the photo grid.
Image 1 is clicked...
...to reveal Image 2
Setup and Usage
Import the component as follows:
import ToggleLazyLoadImage from 'components/ToggleLazyLoadImage'