Optimize _shouldDisplayImagesForDomain.