VID-1946 Create gallery controller for gallery thumbs

This seems like a duplication of code. Might be time to abstract it and use one function for all three templates (video, image, gallery)