By gallery feature you mean like a lightbox over the top of the page?

If so use a plugin like https://wordpress.org/plugins/wp-colorbox/ which will make all images on the site appear like that.