add reference for gallery's thumbnail

back to medias table