Skip to content

picture won't load #33207

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
3 tasks
Alexeyalexeyalex opened this issue Apr 22, 2025 · 4 comments
Open
3 tasks

picture won't load #33207

Alexeyalexeyalex opened this issue Apr 22, 2025 · 4 comments

Comments

@Alexeyalexeyalex
Copy link

Bug description

Good afternoon, I'm trying to add a picture to the dashboard, but the picture won't load.
Link:
https://drive.google.com/file/d/1GTuX1_dIq8Sc972On82yBVszzjk-ddPh/view?usp=sharing
Help please

Screenshots/recordings

Image
Image

Superset version

4.1.2

Python version

I don't know

Node version

I don't know

Browser

Chrome

Additional context

No response

Checklist

  • I have searched Superset docs and Slack and didn't find a solution to my problem.
  • I have searched the GitHub issue tracker and didn't find a similar bug report.
  • I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.
Copy link

dosubot bot commented Apr 22, 2025

Hello @Alexeyalexeyalex! I'm Dosu, a bot here to help you with bugs, answer your questions, and assist you in becoming a contributor. I'm here to support you while you wait for a human maintainer. How can I assist you today?

To display images from Google Drive in Superset dashboards, you need to ensure that the image URL is accessible and properly configured in Superset's content security policy. Superset uses the Talisman content security policy to manage external image sources. You can modify the TALISMAN_CONFIG to include Google Drive URLs in the img-src directive:

TALISMAN_CONFIG = {
    "content_security_policy": {
        "img-src": [
            "'self'",
            "blob:",
            "data:",
            "https://drive.google.com/",  # Add Google Drive domain
        ],
        # ... other configuration settings
    }
}

Make sure the Google Drive link is publicly accessible and formatted correctly for direct image access. Sometimes, Google Drive links need to be adjusted to ensure they point directly to the image file rather than a webpage. You might need to use a direct link format or convert the file to a publicly accessible format.

Additionally, check if there are any browser-specific settings or extensions that might be blocking the image from loading.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other

@rusackas
Copy link
Member

rusackas commented Apr 22, 2025

Check your browser console for a CSP error. You probably need to allow that domain in your Talisman config, as the bot suggests.

@Alexeyalexeyalex
Copy link
Author

I changed the configuration

"img-src": [
"'self'",
"blob:",
"data:",
"https://nmcn.ru/",

but in the collosol an error is displayed

4/:1 Refused to load the image 'https://apachesuperset.gateway.scarf.sh/pixel/0d3461e1-abb1-4691-a0aa-5ed50de66af0/4.1.2//null' because it violates the following Content Security Policy directive: "img-src 'self' data: blob: https://nmcn.ru/".

Link - https://nmcn.ru/core/preview?fileId=12657&x=1920&y=1080&a=true&etag=d97ecb194c1bc4e0d98d162eb54fb20d

@rusackas
Copy link
Member

*scarf.sh should already be in the talisman config. That's just an anonymous telemetry pixel. You can turn off telemetry or enable that in the CSP to allow it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants