Add gallery functionality to posts.