GitbookIO / GitbookIO/gitbook

Image URLs are broken when Markdown versions of published docs

Open
#4,593 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
29k
Forks
4k
Avg merge
1d 2h
Merged PRs (30d)
71

Description

Bug description

Fetching a Markdown version of a published page like this one:

https://gitbook.com/docs/create-content/blocks/insert-images.md

returns embedded images like this

<img src="/files/WNXq6RcD2e4WTRcZEz4f" alt="">

These /files/ URLs are however invalid and are not serving the desired image.

How to reproduce

  1. Fetch a page in Markdown format
  2. Fetch embedded images
  3. Get a 404

Additional context

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by fetching the published Markdown page at https://gitbook.com/docs/create-content/blocks/insert-images.md and inspect how its embedded image URLs are produced. Trace the Markdown response and /files/ image references, then verify that the returned image URLs resolve successfully instead of returning 404.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
documentation
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.