Skip to content

Images missing in editor markdown preview #31294

Closed
@brechtvl

Description

@brechtvl

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 (bbe98a3)

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions