Skip to content

Raw HTML in markdown with relative path img references don't work #132

@dbkinder

Description

@dbkinder

The way Sphinx processing works, raw html isn't processed the same as regular markdown or reST code, so relative references line this will result in a broken image link (without an error being reported by Sphinx):

<p align="left">
<img src="assets/avatar4.png" alt="Image 1" width="130"/>
<img src="assets/avatar1.jpg" alt="Image 2" width="130"/>
<img src="assets/avatar2.jpg" alt="Image 3" width="130"/>
<img src="assets/avatar3.png" alt="Image 4" width="130"/>
<img src="assets/avatar6.png" alt="Image 6" width="130"/>
</p>-

Instead, use a full URL to the image such as:

<img src="https://raw.githubusercontent.com/opea-project/docs/main/community/rfcs/assets/avatar2.jpg" width="130"/>

Or merge these separate images into one that has the expected dimension (width=130 for each image) and use the normal syntax for an image so you don't have to resize it:

![image alt description](assets/avatar-combined.jpg)

This example (the only one in our documentation set, is in docs/community/rfcs/24-08-02-OPEA-AIAvatarChatbot.md

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions