Image Domain Filter
This module restricts images used in text fields to a list of trusted domains, enhancing security by preventing users from embedding images from untrusted sources. It is particularly useful for sites that host user-uploaded files offsite, such as on CDNs or cloud storage.
This module provides a Restrict images to trusted sites filter which allows
administrators to provide a list of allowed hosts/domains for hosting images
used in text fields.
For security purposes, it's best to avoid letting users insert images from untrusted hosts. Drupal core provides a Restrict images to this site filter to provide security
for user-uploaded images in text fields. Unfortunately this is incompatible with
sites that hosts user-loaded files offsite. This module fills a need by allowing sites that host user-uploaded images offsite (CDN, S3/Cloudflare, etc) to restrict image URLs to trusted hosts.