Update gallery controller so that it returns an empty string if no images are present