suitenumerique/docs

Error when exporting an image that is embedded with relative URL

Geschlossen

#1.041 geöffnet am 03.06.2025

 (0 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Python (595 Forks)github user discovery
bugeditorexportfrontendgood first issue

Repository-Metriken

Stars
 (16.557 Sterne)
PR-Merge-Metriken
 (Durchschn. Merge 15T 9h) (40 gemergte PRs in 30 T)

Beschreibung

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.

Contributor Guide