Adding an image into a dashboard #42281
|
I just can't add an image to a dashboard. I have tried using both Markdown and HTML tags with the image URL on the web and it didn't work, this is the error loading the page: Loading the image 'https://i.ibb.co/JwDzM4dB/Logo-Pref-Diadema-com-Frase.png' violates the following Content Security Policy directive: "img-src 'self' blob: data: https://apachesuperset.gateway.scarf.sh https://static.scarf.sh/ https://cdn.brandfolder.io ows.terrestris.de https://cdn.document360.io". The action has been blocked. And I have tried to paste the image into the \superset-frontend\src\assets\images directory but the image also don't appear as it should I am using version: 6.1.0 |
Replies: 1 comment 5 replies
|
Hi @luan-beserra! I'm Dosu and I'm helping the Apache Superset team. The error you're seeing is a Content Security Policy (CSP) violation. Superset's CSP restricts which domains images can be loaded from via the To load images from TALISMAN_CONFIG = {
"content_security_policy": {
"default-src": ["'self'"],
"img-src": [
"'self'",
"blob:",
"data:",
"https://i.ibb.co", # <-- add your image host here
],
# ... keep other directives as needed
},
"content_security_policy_nonce_in": ["script-src"],
"force_https": False,
}Make sure After updating, restart Superset for the changes to take effect. Then you should be able to use a Markdown component on your dashboard with To reply, just mention @dosu. Share context across your team and agents. Try Dosu. |
You don't need to import
flask_talismanin yoursuperset_config.py— Superset handles that internally in its own extensions module [1]. You just set plain Python variables in your config file.Here's what your
superset_config.pyshould look like (no imports needed):