How to Hide or Disable Web Search for External Images in SharePoint Online

In SharePoint Online, the web search feature for external images allows users to easily find and insert images from the web into the webpart like Image, Image Gallery, Quick Links, and Hero. While this can be convenient, it also poses potential risks, such as the unintentional inclusion of inappropriate content or copyright violations. This blog post will guide you through the steps to hide or disable the web search for external images in SharePoint Online to ensure your organization’s content remains safe and compliant.

Why Disable Web Search for External Images?

  1. Security: Prevent the inclusion of potentially harmful or inappropriate images.
  2. Compliance: Ensure that only authorized, licensed images are used in your organization’s documents and pages.
  3. Control: Maintain better governance over the content used within your SharePoint environment.

In this blog post, we’ll examine how to hide or disable the Web search feature in SharePoint by utilizing SharePoint Online PowerShell and PnP PowerShell for MS 365.

By using SharePoint Online PowerShell


# Variable for Url of SharePoint online admin center
$Url = "https://[tenant]-admin.sharepoint.com/"

# Connect to SharePoint online Admin Center
Connect-SPOService -Url $Url

# Disable external image "Web Search" feature in SharePoint using SharePoint Online PowerShell
Set-SPOTenant -FilePickerExternalImageSearchEnabled $false

By using PnP PowerShell


# Variable for Url of SharePoint online admin center
$Url = "https://[tenant]-admin.sharepoint.com/"

# Connect to SharePoint online Admin Center
Connect-PnPOnline -Url $adminCenterUrl -Interactive

# Disable external image "Web Search" feature in SharePoint using PnP PowerShell
Set-PnPTenant -FilePickerExternalImageSearchEnabled $false

Important Note:

  1. Above PowerShell scripts require SharePoint tenant administrator permissions to execute.
  2. The modification will require up to 48 hours to become effective.

Leave a Reply

Your email address will not be published. Required fields are marked *