Title: Block external image src?
Last modified: January 22, 2021

---

# Block external image src?

 *  Resolved [Pascal](https://wordpress.org/support/users/kitepascal/)
 * (@kitepascal)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/block-external-image-src/)
 * Hi,
 * is it possible and what would be the best way to block an image src with Complianz?
   
   It’s setting Cookies (not wanted prior consent)
 * Or is it only designated to block script src & iframes?
 * <div class=”textwidget custom-html-widget”>
    < a href=”[https://www.example.org/cread.php?s=xxx&v=xxx&q=xxx&r=xxx”&gt](https://www.example.org/cread.php?s=xxx&v=xxx&q=xxx&r=xxx”&gt);
   < img src=”[https://www.example.org/cshow.php?s=xxx&v=xxx&q=xxx&r=xxx”](https://www.example.org/cshow.php?s=xxx&v=xxx&q=xxx&r=xxx”)
   border=”0″ /> < /a> </div>
 * Thanks
    -  This topic was modified 5 years, 4 months ago by [Pascal](https://wordpress.org/support/users/kitepascal/).
    -  This topic was modified 5 years, 4 months ago by [Pascal](https://wordpress.org/support/users/kitepascal/).
    -  This topic was modified 5 years, 4 months ago by [Pascal](https://wordpress.org/support/users/kitepascal/).
    -  This topic was modified 5 years, 4 months ago by [Pascal](https://wordpress.org/support/users/kitepascal/).
    -  This topic was modified 5 years, 4 months ago by [Pascal](https://wordpress.org/support/users/kitepascal/).
    -  This topic was modified 5 years, 4 months ago by [Pascal](https://wordpress.org/support/users/kitepascal/).
    -  This topic was modified 5 years, 4 months ago by [Pascal](https://wordpress.org/support/users/kitepascal/).
    -  This topic was modified 5 years, 4 months ago by [Pascal](https://wordpress.org/support/users/kitepascal/).

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Contributor [Rogier Lankhorst](https://wordpress.org/support/users/rogierlankhorst/)
 * (@rogierlankhorst)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/block-external-image-src/#post-13944208)
 * Hi [@kitepascal](https://wordpress.org/support/users/kitepascal/),
 * This can be done with a filter, added as mu-plugin.
    You can add this file in
   your mu-plugins folder: [https://github.com/Really-Simple-Plugins/complianz-integrations/blob/master/block-images.php](https://github.com/Really-Simple-Plugins/complianz-integrations/blob/master/block-images.php)
 * the images will get replaced with a placeholder.
 * For instructions on mu plugins, please see this article:
    [https://complianz.io/adding-filters-with-mu-plugins-quick-easy/](https://complianz.io/adding-filters-with-mu-plugins-quick-easy/)
 *  Thread Starter [Pascal](https://wordpress.org/support/users/kitepascal/)
 * (@kitepascal)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/block-external-image-src/#post-13948458)
 * Hi [@rogierlankhorst](https://wordpress.org/support/users/rogierlankhorst/),
 * thank you!
    The image gets replaced now, but stays replaced on (Marketing) Cookies
   accept. Also after reload.
 * I guess Complianz’ JavaScript should revert the image src if Marketing accepted?
   
   Not happening here.
 * See bambooblog[.]de – Sidebar right, the 2nd image after “China Reisen – Facebook-
   Gruppe”.
 *  Plugin Contributor [Rogier Lankhorst](https://wordpress.org/support/users/rogierlankhorst/)
 * (@rogierlankhorst)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/block-external-image-src/#post-13949075)
 * [@kitepascal](https://wordpress.org/support/users/kitepascal/) You’re right. 
   I now realised this feature was only partly implemented, as part of the WP Google
   Maps Widget integration, which required only the blocking part.
 * I’ve finished the activation part here:
    [https://github.com/Really-Simple-Plugins/complianz-gdpr/tree/activate-blocked-images](https://github.com/Really-Simple-Plugins/complianz-gdpr/tree/activate-blocked-images)
 * I’ve just tested this, the activation is working well now. Let me know if this
   works for you as well!
 * In this implementation the same solution is used as for other blocked content:
   a notice appears on the image to indicate the content is blocked. I can imagine
   this could be a bit too much when there are a lot of images. You can disable 
   the placeholder feature in the settings, although it will disable all placeholders
   on the site.
 *  Thread Starter [Pascal](https://wordpress.org/support/users/kitepascal/)
 * (@kitepascal)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/block-external-image-src/#post-13949443)
 * Thank you again. Awesome Support! (y)
 * Working perfect now.
 *  Plugin Contributor [Rogier Lankhorst](https://wordpress.org/support/users/rogierlankhorst/)
 * (@rogierlankhorst)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/block-external-image-src/#post-13952348)
 * [@kitepascal](https://wordpress.org/support/users/kitepascal/),
    great, thanks
   for confirming 🙂

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Block external image src?’ is closed to new replies.

 * ![](https://ps.w.org/complianz-gdpr/assets/icon-256x256.png?rev=2881064)
 * [Complianz - GDPR/CCPA Cookie Consent](https://wordpress.org/plugins/complianz-gdpr/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/complianz-gdpr/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/complianz-gdpr/)
 * [Active Topics](https://wordpress.org/support/plugin/complianz-gdpr/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/complianz-gdpr/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/complianz-gdpr/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [Rogier Lankhorst](https://wordpress.org/support/users/rogierlankhorst/)
 * Last activity: [5 years, 4 months ago](https://wordpress.org/support/topic/block-external-image-src/#post-13952348)
 * Status: resolved