Inline images not working

Get help from other users here.

Moderators: Developer, Contributor

acoder2020
Posts: 103
Joined: 11 Jan 2024, 19:32

Inline images not working

Post 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.
cas
Posts: 1768
Joined: 11 Mar 2006, 16:08
Contact:

Re: Inline images not working

Post by cas »

Did you check max size/dimensions of the image?
acoder2020
Posts: 103
Joined: 11 Jan 2024, 19:32

Re: Inline images not working

Post by acoder2020 »

It is JPEG 1000 x 592 pixels, 132.0 kB
acoder2020
Posts: 103
Joined: 11 Jan 2024, 19:32

Re: Inline images not working

Post 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:".
acoder2020
Posts: 103
Joined: 11 Jan 2024, 19:32

Re: Inline images not working

Post 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?
acoder2020
Posts: 103
Joined: 11 Jan 2024, 19:32

Re: Inline images not working

Post 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.
acoder2020
Posts: 103
Joined: 11 Jan 2024, 19:32

Re: Inline images not working

Post by acoder2020 »

Asking for another follow up here, not sure if this is a real bug or if I'm doing something wrong.
acoder2020
Posts: 103
Joined: 11 Jan 2024, 19:32

Re: Inline images not working

Post 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?
cas
Posts: 1768
Joined: 11 Mar 2006, 16:08
Contact:

Re: Inline images not working

Post by cas »

My best guess is you still have an issue with CSP
acoder2020
Posts: 103
Joined: 11 Jan 2024, 19:32

Re: Inline images not working

Post 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
cas
Posts: 1768
Joined: 11 Mar 2006, 16:08
Contact:

Re: Inline images not working

Post by cas »

Are you using a plugin to insert images in the notes?
acoder2020
Posts: 103
Joined: 11 Jan 2024, 19:32

Re: Inline images not working

Post 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?
cas
Posts: 1768
Joined: 11 Mar 2006, 16:08
Contact:

Re: Inline images not working

Post by cas »

I am struggling to understand where you are encountering the issue, can you provide a printscreen?
acoder2020
Posts: 103
Joined: 11 Jan 2024, 19:32

Re: Inline images not working

Post 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
cas
Posts: 1768
Joined: 11 Mar 2006, 16:08
Contact:

Re: Inline images not working

Post by cas »

This not vanilla Mantis afaik. Which plugins did you install?
Post Reply