# Setting Richtext via Markdown API will reference external images

**URL:** <https://community.fibery.io/t/setting-richtext-via-markdown-api-will-reference-external-images/10696>\
**Category:** Get Help\
**Created:** [April 5, 2026, 7:18am UTC](https://community.fibery.io/t/setting-richtext-via-markdown-api-will-reference-external-images/10696 "2026-04-05T07:18:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![NiklasPor](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/niklaspor/32/14207_2.png) [@NiklasPor](https://community.fibery.io/u/NiklasPor)\
**Post date:** [April 5, 2026, 7:18am UTC](https://community.fibery.io/t/setting-richtext-via-markdown-api-will-reference-external-images/10696/1 "2026-04-05T07:18:49Z")

</div>

The GQL is in my opinion already quite good to use. I’m currently using it to try to transfer internal documentation from other (cloud) systems into fibery.

I noticed that images that are referenced via URL from external site are actually not replaced with Fibery uploads, but instead stay as external references. This is not what I expected (as the UI markdown import works differently) – but also because the image URLs from the external systems might not work forever.

Would be great to have an option inside the API to automatically pull the files into Fibery.

Is there a recommended way to work around this or should we just write our own scripts to download and upload the files to Fibery (via the REST API)?

---

<div class="post-metadata">

**Author:** ![NiklasPor](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/niklaspor/32/14207_2.png) [@NiklasPor](https://community.fibery.io/u/NiklasPor)\
**Post date:** [April 7, 2026, 5:14pm UTC](https://community.fibery.io/t/setting-richtext-via-markdown-api-will-reference-external-images/10696/2 "2026-04-07T17:14:19Z")

</div>

As a workaround for now, first upload the file via the REST API:

```auto
const response = await fetch(“API_ENDPOINT“,{
            method: "POST",
            headers: {
                'Authorization': `Token ${this._token}`,
            },
            formData: {
                file: // BLOB or Stream
}
        })

const json = await response.json();

// Now you can use the secret as an image URL in the document markdown:
// ![ALT](YOUR_FIBERY_URL/api/files/{{json["fibery/secret"]}})

```
