• When I try to insert an image link in a post, the image cannot be displayed. As shown in the figure below:

    屏幕截图 2022-01-25 143052.png

    I'm sure that the picture link is accessible, and there are some errors in the browser.

    屏幕截图 2022-01-25 152554.png

    What should I do to fix these bugs?


  • NodeBB Admin

    What commit has are you on? Are you using latest master or 1.19.x?

  • @baris I am in the latest version 1.19.1, there is no errors when I compile source code .

  • NodeBB Admin

    Can you check if you have these enabled in admin/settings/advanced

  • @baris I tried this method and restart nodebb in dashboard, but it doesn't work,Should I change other options?屏幕截图 2022-01-25 231824.png

  • NodeBB Admin

    Disable Cross-Origin-Embedder-Policy and restart nodebb.

  • @baris I disabled this option and restart nodebb, but it doesn't work too.屏幕截图 2022-01-25 232732.png

  • This post is deleted!

  • @baris It works in my tablet, but doesn’t appear in my computer. Is it caused by different browsers。

  • I I followed @baris 's instructions and modified the setting of Cross-origin-Embedder-Policy. Now I can browse pictures with my mobile phone and tablet.
    However, the edge and chrome browsers on my computer still can't use image links.
    At the same time, I have an interesting discovery. When I delete the edge cookie, the picture can be displayed.
    However, when I refresh the page, the picture disappears again.
    In other words, as long as there is a cookie, the picture cannot be displayed normally in chrome. Why?
    I think I'm close to the truth.

  • I know why the picture won't show.

    If I enter my domain name in the address bar of the browser: "ahoh. club", the picture disappears.
    屏幕截图 2022-01-26 134625.png

    However, if I enter "www.ahoh. Club" in the address bar of the browser, the picture can be displayed normally.
    屏幕截图 2022-01-26 134651.png

    Thank you very much for your guidance!

  • Finally, to make a summary, I met a strange problem when building nodebb: when I write a post, the uploaded pictures can be displayed normally, but the picture links cannot be displayed.
    The solution is to set "cross origin embed policy" to the state shown in the following figure:
    屏幕截图 2022-01-26 153145.png
    However, there is another strange problem. When you use "www.domain. Org" to access, you can display pictures normally, but when you use "domain. org", you still can't display pictures.
    You can configure nginx to make "domain. org" jump to "www.domain. Org" through 301。

    Welcome to my station, ahoh.club,Thank nodebb, thank Mr. cat(baris).

Suggested Topics

  • 29
  • 5
  • 5
  • 19
  • 4
| | |

© 2014 – 2022 NodeBB, Inc. — Made in Canada.