A quick demo: Codesandbox link
Notice that when the image is switched, text related to the next image appears right away, but as the next image loads, the previous one stays there until the next one hasn't fully loaded.
Initially, the user sees:
Text 1
[ ]
[ Image1 ]
[ ]
On switching, the next image takes some time to load, so the user sees
Text 2
[ ]
[ Image1 ]
[ ]
and then,
Text 2
[ ]
[ Image2 ]
[ ]
Ideally, I'd like to clear the previous image while the next one is loading. Is there a way to do this? That is, while the next image is loading, the user should seee
Text 2
[ ]
[ ]
[ ]
Obviously, this only happens the first time an image is loaded. After an image is fetched (and I guess stored in session cache or something), there is no delay when the images are switched.