Add support for multi-column images in gallery