Image assets added to richtext fields don't render / produce the wrong URI

I have…

  • [ ] Checked the logs and have uploaded a log file and provided a link because I found something suspicious there. Please do not post the log file in the topic because very often something important is missing.

I’m submitting a…

  • [ ] Regression (a behavior that stopped working in a new release)
  • [x] Bug report
  • [ ] Performance issue
  • [ ] Documentation issue or request

Current behavior

When using a richtext field and putting an image in, the image does not load when rendering the HTML on the website. Instead it shows the filename. The URI itself returns a 403.

Example URI: https://xxx.com/api/assets/xxx/802dc2d3-4eaf-41a7-b923-83faf7db0e3a/04.-xxx-xxx-xxx.jpeg?version=0

It works fine when dropping the last segment ‘/04.-xxx-xxx-xxx.jpeg?version=0’.

Might be a duplicate of [SOLVED] Asset URLs get version parameter that leads to 404 but not entirely sure.

Expected behavior

The image should load fine.

Minimal reproduction of the problem

  1. Create a schema
  2. Add a localizable text field
  3. Set the text field to richtext
  4. Put an image in the text field
  5. Render the output HTML

Environment

  • [x] Self hosted with docker

Version: latest docker tags as of today (29 / 01 / 2020)

Browser:

  • [x ] Chrome (desktop)
  • [ x] Chrome (Android)
  • [ x] Chrome (iOS)
  • [x ] Firefox
  • [ x] Safari (desktop)
  • [ x] Safari (iOS)
  • [ x] IE
  • [ x] Edge

Thanks, I will have a look. Are you sure that you are not using protected assets?

I just drag the images into the richtext field, does that make them protected?

No, I will have a look.

1 Like

Hi, have you been able to reproduce the problem yet?

To be honest, I havent had a look yet.

Hi

I just saw this has been marked as SOLVED, was that intentional? Still interested in finding a fix.

Thank you!

Sorry, I think I have misunderstood the issue. I have found a bug where a wrong tag (anchor instead of img) was rendered.

Does the issue only happen with certain file names?

I tried it again with your filename, but I cannot reproduce it.

Can you send me your file?

Hi this is the filename: wordle-sterke-punten.png

This is the image. If you want I can also PM you the URL.

1 Like

I tried to reproduce it:

Is there any way I can PM you the URI?

Sure, click my avatar, then press “Message”

Issue has been resolved. I had Hotlink protection on on cloudflare, which blocked the requests.

Thanks @Sebastian for the help!