Inline images not working
Moderators: Developer, Contributor
-
- Posts: 103
- Joined: 11 Jan 2024, 19:32
Inline images not working
I need to use some inline images in documentation.
Using the image insert icon above the note entry box, I enter my image location (valid, it opens just fine in a browser)
This results in markdown:

When I preview or save the note, all I see is a broken image icon and the text "my image"
The image is accessible via standard web browser.
Using the image insert icon above the note entry box, I enter my image location (valid, it opens just fine in a browser)
This results in markdown:

When I preview or save the note, all I see is a broken image icon and the text "my image"
The image is accessible via standard web browser.
Re: Inline images not working
Did you check max size/dimensions of the image?
-
- Posts: 103
- Joined: 11 Jan 2024, 19:32
Re: Inline images not working
It is JPEG 1000 x 592 pixels, 132.0 kB
-
- Posts: 103
- Joined: 11 Jan 2024, 19:32
Re: Inline images not working
Wait, discovered the problem:
Refused to load the image 'https://example.com/blahlbhalbh.jpg' because it violates the following Content Security Policy directive: "img-src 'self' 'self' data:".
Refused to load the image 'https://example.com/blahlbhalbh.jpg' because it violates the following Content Security Policy directive: "img-src 'self' 'self' data:".
-
- Posts: 103
- Joined: 11 Jan 2024, 19:32
Re: Inline images not working
That fixed one issue but the images are still not appearing inline.
They work when I click Preview when editing the note.
When the note is saved, it still shows the broken image.
The underlying HTML code shows as
So somehow the system is not writing these as images but href links?
They work when I click Preview when editing the note.
When the note is saved, it still shows the broken image.
Code: Select all

Code: Select all
<p></p>
-
- Posts: 103
- Joined: 11 Jan 2024, 19:32
Re: Inline images not working
Following up on this issue - if this sounds like a bug let me know so I can submit.acoder2020 wrote: 08 Aug 2024, 14:48 That fixed one issue but the images are still not appearing inline.
They work when I click Preview when editing the note.
When the note is saved, it still shows the broken image.
The underlying HTML code shows asCode: Select all

So somehow the system is not writing these as images but href links?Code: Select all
<p></p>
-
- Posts: 103
- Joined: 11 Jan 2024, 19:32
Re: Inline images not working
Asking for another follow up here, not sure if this is a real bug or if I'm doing something wrong.
-
- Posts: 103
- Joined: 11 Jan 2024, 19:32
Re: Inline images not working
One again asking for a follow up, is this a bug or should I take the complete lack of replies since almost a month ago that it's a bug that won't be fixed?
Re: Inline images not working
My best guess is you still have an issue with CSP
-
- Posts: 103
- Joined: 11 Jan 2024, 19:32
Re: Inline images not working
When the note is saved, it still shows the broken image.
Code: Select all

Code: Select all
<p></p>
Re: Inline images not working
Are you using a plugin to insert images in the notes?
-
- Posts: 103
- Joined: 11 Jan 2024, 19:32
Re: Inline images not working
Is there even such a plugin?
Re: Inline images not working
I am struggling to understand where you are encountering the issue, can you provide a printscreen?
-
- Posts: 103
- Joined: 11 Jan 2024, 19:32
Re: Inline images not working
1) note entry form

2) click image button

3) paste image url

4) before note submit:

5) note after submitting

6) editing previously submitted note


2) click image button

3) paste image url

4) before note submit:

5) note after submitting

6) editing previously submitted note

Re: Inline images not working
This not vanilla Mantis afaik. Which plugins did you install?