Fix for displaying selected image on the image gallery