adds masonry to gallery detail for images