People are very likely to, when trying to get out of viewing a photo, use the device back button. Unfortunately this goes back a page. For example if you have Parfait added to your home screen and open it from there, and you're on the feed, and you click on an image from the feed, it just shows the closest out of Parfait, which isn't exactly ideal.
I think that making it so that when you open a photo, you navigate to a new route (even if it's just through a hashtag at the end of the route), and then clearing it when you go back. That way the back button is saying, "Go back a page," and goes back to the feed or the post or whatever you're looking at, instead of just exiting completely
should be fixed, going back in history on desktop and mobile will close the image viewer