GitHub user dosubot[bot] added a comment to the discussion: Handlebars graphic
<!-- Answer -->
To allow base64 images in Handlebars charts, add the following to your
superset_config.py (or config.py if you are customizing directly):
```python
HTML_SANITIZATION_SCHEMA_EXTENSIONS = {
"protocols": {
"src": ["data"],
}
}
```
This configuration permits the `data:` protocol for the `src` attribute, which
enables base64 images to render in `<img>` tags. After updating your config,
restart Superset for the change to take effect. Be cautious when extending
sanitization rules, as this can introduce security risks if untrusted content
is allowed. More details and examples are in the [config.py
documentation](https://github.com/apache/superset/blob/master/superset/config.py).
<!-- Dosu Comment Footer -->
*To reply, just mention [@dosu](https://go.dosu.dev/dosubot).*
---
<sup>How did I do?
[Good](https://app.dosu.dev/response-feedback/3b999d5c-0f4b-44da-9678-f25f3a26703f?feedback_type=great_response)
|
[Irrelevant](https://app.dosu.dev/response-feedback/3b999d5c-0f4b-44da-9678-f25f3a26703f?feedback_type=irrelevant_answer)
|
[Incorrect](https://app.dosu.dev/response-feedback/3b999d5c-0f4b-44da-9678-f25f3a26703f?feedback_type=incorrect_sources)
|
[Verbose](https://app.dosu.dev/response-feedback/3b999d5c-0f4b-44da-9678-f25f3a26703f?feedback_type=too_verbose)
|
[Hallucination](https://app.dosu.dev/response-feedback/3b999d5c-0f4b-44da-9678-f25f3a26703f?feedback_type=hallucination)
| [Report
🐛](https://app.dosu.dev/response-feedback/3b999d5c-0f4b-44da-9678-f25f3a26703f?feedback_type=bug_report)
|
[Other](https://app.dosu.dev/response-feedback/3b999d5c-0f4b-44da-9678-f25f3a26703f?feedback_type=other)</sup> [](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github)&
nbsp;[](https://go.dosu.dev/discord-bot) [](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/discussions/35689)
GitHub link:
https://github.com/apache/superset/discussions/35689#discussioncomment-14702682
----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
