2

I'm running Drupal Core 9.3.7, with basically the default set up. The Basic HTML editor is CKEditor. If I include an image in a page, that image is not shown when I view the page; on inspection, it is actually there, but with the height="16" width="16" attributes, and a title that says:

This image has been removed. For security reasons, only images from the local domain are allowed

The image is in the local domain (the relative path is /files/inline-images/Picture%201.png); it was literally uploaded in the content editor. If I put in the URL of the image into the browser, it works. It doesn't seem an upload or a permission issue.

If I go to Configuration » Text formats and editors » Basic HTML » Configure and deselect Restrict images to this site, the images appear.

Any help would be much appreciated. I'm a complete Drupal newbie.

4
  • Is there a query string on the image URL?
    – cilefen
    Mar 16, 2022 at 16:32
  • @cliefen - no, just the URL to the file.
    – Phil Evans
    Mar 17, 2022 at 8:06
  • Does the text format have other filters active that might interfere here? I just read on drupal.org/project/inline_responsive_images/issues/2875845 (rather old though and for D8) that the "Display responsive images" and "Track images uploaded via a Text Editor" might have an effect on this.
    – berliner
    Mar 17, 2022 at 10:30
  • @berliner There are a few other (default) ones on (Limit allowed HTML tags and correct faulty HTML, align images, caption images, Track images uploaded via a Text Editor) but turning this off does not fix the problem.
    – Phil Evans
    Mar 17, 2022 at 14:58

1 Answer 1

1

I solved this by re-ordering the filters, so tracking is done before the Restriction check.

  • Track images uploaded via a Text Editor
  • Restrict images to this site*
  • Image Resize Filter: Resize images based on their given height and width attributes

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.