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.

贡献者指南