update media gallery templates