suitenumerique/docs

Error when exporting an image that is embedded with relative URL

已關閉

#1,041 建立於 2025年6月3日

 (0 則留言) (0 個反應) (0 位負責人)Python (595 個分叉)github user discovery
bugeditorexportfrontendgood first issue

倉庫指標

星標
 (16,557 顆星)
PR 合併指標
 (平均合併 15天 9小時) (30 天內合併 40 個 PR)

描述

How to Reproduce?

  1. Create document
  2. Add an image, by embedding a relative file url eg. /assets/favicon-light.png

Image

  1. Is displayed correctly

Image

  1. But when exported, causes Cors error

Image Pdf

Why would you want to embed relative image URLs?

  • Future Tutorial Document needs it for example.
  • And maybe in some infrastructure you could have file serving on the same domain.

Ways to fix

No need for relative images to be proxied. No cors issue would occur. So if image url starts with a / - export the image directly, without routing through cors proxy.

貢獻者指南