Adds functionality for gallery.