Turns out that the thumbnails in the overly gallery are taken from the full-sized images, and for some reason it requires that the image URLs have a valid image file extension.
As you can see, mine don't. If I use a name like ../GetFile.aspx?file=771e72aa-2b0a-ea59-75ff-cc769801ce53&.jpg
, the thumbnails appear as expected.