Images missing in editor markdown preview #13118

Closed
opened 2025-11-02 10:31:38 -06:00 by GiteaMirror · 0 comments
Owner

Originally created by @brechtvl on GitHub (Jun 7, 2024).

Description

When using the editor to edit a markdown file with images, the Preview tab no longer shows images. The images do show correctly when viewing the markdown file without the editor.

Example:
https://demo.gitea.com/brechtvl/test

It appears to be caused by #26745. The link is wrong and /src/ should be replaced by /media/, which used to happen before this change.

RenderMarkup in routers/common/markup.go should probably create a markup.Links with BranchPath and TreePath, but I'm not sure what the best way is to achieve that.

Gitea Version

1.22 (bbe98a3254)

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

Ubuntu Linux 23.10

How are you running Gitea?

Running own build from command line.

Database

SQLite

Originally created by @brechtvl on GitHub (Jun 7, 2024). ### Description When using the editor to edit a markdown file with images, the Preview tab no longer shows images. The images do show correctly when viewing the markdown file without the editor. Example: https://demo.gitea.com/brechtvl/test It appears to be caused by #26745. The link is wrong and `/src/` should be replaced by `/media/`, which used to happen before this change. `RenderMarkup` in `routers/common/markup.go` should probably create a `markup.Links` with `BranchPath` and `TreePath`, but I'm not sure what the best way is to achieve that. ### Gitea Version 1.22 (bbe98a3254) ### Can you reproduce the bug on the Gitea demo site? Yes ### Log Gist _No response_ ### Screenshots _No response_ ### Git Version _No response_ ### Operating System Ubuntu Linux 23.10 ### How are you running Gitea? Running own build from command line. ### Database SQLite
GiteaMirror added the type/bug label 2025-11-02 10:31:38 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#13118