HumanSignal / HumanSignal/label-studio

[Bug] Base64 `img` data deleted within `html` for `Choices` or `List`

Open
#7,363 1 comment 0 reactions 0 assignees View on GitHub
community_investigate
Dominant language
TypeScript
Stars
28.3k
Forks
3.7k
Avg merge
14h
Merged PRs (30d)
15

Description

**Describe the bug**

While LabelStudio's `Image` tags display base64 correctly, I can't put base64 strings within an `img` tag for the `html` fields for `Choices` or `List`. The `src` field gets completely deleted in the displayed UI (see screenshot), even though I can clearly see that the fields are in the uploaded data (see screenshot). I've also confirmed that using a hosted URL works for `src` so it seems like a base64 issue.

**To Reproduce**
Steps to reproduce the behavior:
1. Create a template with `Choices`
2. Supply values with `html` that contains `img` tags with base64 source

```

```

```
{
"values": [
{
"id": "1",
"title": "title",
"value": "value",
"html": ""
}
]
}
```

**Expected behavior**
The `img` tag should display the base64 value.

**Screenshots**

![Image](https://github.com/user-attachments/assets/323b4a9c-ec56-4287-9212-8bc762a8edde)
![Image](https://github.com/user-attachments/assets/bd2a0be1-523d-4625-bd98-c97b7f629d7f)
![Image](https://github.com/user-attachments/assets/68b1b483-90ff-4bc3-8950-f7d1565baece)

**Environment (please complete the following information):**
- OS: [e.g. iOS]: Deployed
- Label Studio Version [e.g. 0.8.0]: 1.15.0

**Additional context**
Add any other context about the problem here.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.