Page 1 of 2

Inline images not working

Posted: 07 Aug 2024, 21:29
by acoder2020
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:

![my image](https://example.com/images/documentation/oY2TD.jpg "my image")


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

Posted: 08 Aug 2024, 13:59
by cas
Did you check max size/dimensions of the image?

Re: Inline images not working

Posted: 08 Aug 2024, 14:15
by acoder2020
It is JPEG 1000 x 592 pixels, 132.0 kB

Re: Inline images not working

Posted: 08 Aug 2024, 14:19
by acoder2020
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:".

Re: Inline images not working

Posted: 08 Aug 2024, 14:48
by acoder2020
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.

Code: Select all

![my image](https://example.com/images/documentation/oY2TD.jpg "my image")
The underlying HTML code shows as

Code: Select all

<p>![enter image description here](<a href="https://example.com/images/documentation/oY2TD.jpg" rel="noopener">https://example.com/images/documentation/oY2TD.jpg</a> "enter image title here")</p>
So somehow the system is not writing these as images but href links?

Re: Inline images not working

Posted: 13 Aug 2024, 13:50
by acoder2020
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.

Code: Select all

![my image](https://example.com/images/documentation/oY2TD.jpg "my image")
The underlying HTML code shows as

Code: Select all

<p>![enter image description here](<a href="https://example.com/images/documentation/oY2TD.jpg" rel="noopener">https://example.com/images/documentation/oY2TD.jpg</a> "enter image title here")</p>
So somehow the system is not writing these as images but href links?
Following up on this issue - if this sounds like a bug let me know so I can submit.

Re: Inline images not working

Posted: 28 Aug 2024, 20:02
by acoder2020
Asking for another follow up here, not sure if this is a real bug or if I'm doing something wrong.

Re: Inline images not working

Posted: 03 Sep 2024, 13:04
by acoder2020
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

Posted: 03 Sep 2024, 15:42
by cas
My best guess is you still have an issue with CSP

Re: Inline images not working

Posted: 03 Sep 2024, 16:28
by acoder2020
cas wrote: 03 Sep 2024, 15:42 My best guess is you still have an issue with CSP
When the note is saved, it still shows the broken image.

Code: Select all

![my image](https://example.com/images/documentation/oY2TD.jpg "my image")
The underlying HTML code shows as

Code: Select all

<p>![enter image description here](<a href="https://example.com/images/documentation/oY2TD.jpg" rel="noopener">https://example.com/images/documentation/oY2TD.jpg</a> "enter image title here")</p>
This looks like a potential issue with post processing and nothing to do with Content Security Policy

Re: Inline images not working

Posted: 04 Sep 2024, 12:11
by cas
Are you using a plugin to insert images in the notes?

Re: Inline images not working

Posted: 04 Sep 2024, 19:59
by acoder2020
cas wrote: 04 Sep 2024, 12:11 Are you using a plugin to insert images in the notes?
Is there even such a plugin?

Re: Inline images not working

Posted: 04 Sep 2024, 20:05
by cas
I am struggling to understand where you are encountering the issue, can you provide a printscreen?

Re: Inline images not working

Posted: 04 Sep 2024, 20:21
by acoder2020
1) note entry form
Image

2) click image button
Image

3) paste image url
Image

4) before note submit:
Image

5) note after submitting
Image

6) editing previously submitted note
Image

Re: Inline images not working

Posted: 05 Sep 2024, 14:30
by cas
This not vanilla Mantis afaik. Which plugins did you install?