Maybe do this more generally so it works for any file under .gallery?