GitHub user dosubot[bot] added a comment to the discussion: Image is blank during pdf export in Superset UI
<!-- Answer --> You're absolutely right—this is a **virtualization issue**, not CSP. The behavior you're describing (images fine on fresh load, blank after scroll) is a [known issue with DASHBOARD_VIRTUALIZATION](https://github.com/apache/superset/issues/38076#issuecomment-3922955086). Here's what's happening: Superset uses IntersectionObserver to [unmount components when they scroll more than ~400% viewport distance away, and remounts them when they come back within ~100% viewport distance](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/src/dashboard/components/gridComponents/Row.jsx#L171-L211). When components remount, they may not properly restore their image content—this is [a known state loss issue during virtualization cycles](https://github.com/apache/superset/issues/31741#issuecomment-3221702745). **Workarounds to try:** 1. **Disable virtualization** (you mentioned you tried this, but confirm it's fully applied): ```python FEATURE_FLAGS = { "DASHBOARD_VIRTUALIZATION": False, } ``` Make sure to restart Superset after changing this. 2. **For Embedded UI specifically**: There's a [fix that prevents chart unloading in embedded mode](https://github.com/apache/superset/pull/33422) (PR #33422). Verify you're running a build that includes this. 3. **Check Node.js version**: [Superset 6.0.0 requires Node.js 20.x](https://github.com/apache/superset/issues/38076#issuecomment-3922955086). Using Node 16 can cause similar rendering/disappearing issues. 4. **Disable DYNAMIC_PLUGINS** if enabled—it's [known to cause rendering problems](https://github.com/apache/superset/issues/38076#issuecomment-3922955086). Several PRs have addressed re-render issues with virtualization ([#36011](https://github.com/apache/superset/pull/36011), [#34975](https://github.com/apache/superset/pull/34975)), but images in Handlebars/Markdown components may still be affected since they don't have explicit image state preservation during unmount/remount cycles. Can you confirm: - Virtualization is actually disabled after restart? - What Node.js version you're running? <!-- 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/d7239001-60d9-4f5b-b14b-d924b200ca75?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/d7239001-60d9-4f5b-b14b-d924b200ca75?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/d7239001-60d9-4f5b-b14b-d924b200ca75?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/d7239001-60d9-4f5b-b14b-d924b200ca75?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/d7239001-60d9-4f5b-b14b-d924b200ca75?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/d7239001-60d9-4f5b-b14b-d924b200ca75?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/d7239001-60d9-4f5b-b14b-d924b200ca75?feedback_type=other)</sup> [](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github) [](https://cursor.com/link/prompt?text=You%27re%20absolutely%20right%E2%80%94this%20is%20a%20%2A%2Avirtualization%20issue%2A%2A%2C%20not%20CSP.%20The%20behavior%20you%27re%20describing%20%28images%20fine%20on%20fresh%20load%2C%20blank%20after%20scroll%29%20is%20a%20%5Bknown%20issue%20with%20DASHBOARD_VIRTUALIZATION%5D%28https%3A//github.com/apache/superset/issues/38076%23issuecomment-3922955086%29.%0A%0AHere%27s%20what%27s%20happening%3A%20Superset%20uses%20IntersectionObserver%20to%20%5Bunmount%20components%20when%20they%20scroll%20more%20than%20~400%25%20viewport%20distance%20away%2C%20and%20remounts%20them%20when%20they%20come%20back%20within%20~100%25%20viewport%20distance%5D%28https%3A//github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/src/dash board/components/gridComponents/Row.jsx%23L171-L211%29.%20When%20components%20remount%2C%20they%20may%20not%20properly%20restore%20their%20image%20content%E2%80%94this%20is%20%5Ba%20known%20state%20loss%20issue%20during%20virtualization%20cycles%5D%28https%3A//github.com/apache/superset/issues/31741%23issuecomment-3221702745%29.%0A%0A%2A%2AWorkarounds%20to%20try%3A%2A%2A%0A%0A1.%20%2A%2ADisable%20virtualization%2A%2A%20%28you%20mentioned%20you%20tried%20this%2C%20but%20confirm%20it%27s%20fully%20applied%29%3A%0A%20%20%20%60%60%60python%0A%20%20%20FEATURE_FLAGS%20%3D%20%7B%0A%20%20%20%20%20%20%20%22DASHBOARD_VIRTUALIZATION%22%3A%20False%2C%0A%20%20%20%7D%0A%20%20%20%60%60%60%0A%20%20%20Make%20sure%20to%20restart%20Superset%20after%20changing%20this.%0A%0A2.%20%2A%2AFor%20Embedded%20UI%20specifically%2A%2A%3A%20There%27s%20a%20%5Bfix%20that%20prevents%20chart%20unloading%20in%20embedded%20mode%5D%28https%3A//github.com/apache/superset/pull/33422%29%20%28PR%20%2333422%29.%20Verify%20yo u%27re%20running%20a%20build%20that%20includes%20this.%0A%0A3.%20%2A%2ACheck%20Node.js%20version%2A%2A%3A%20%5BSuperset%206.0.0%20requires%20Node.js%2020.x%5D%28https%3A//github.com/apache/superset/issues/38076%23issuecomment-3922955086%29.%20Using%20Node%2016%20can%20cause%20similar%20rendering/disappearing%20issues.%0A%0A4.%20%2A%2ADisable%20DYNAMIC_PLUGINS%2A%2A%20if%20enabled%E2%80%94it%27s%20%5Bknown%20to%20cause%20rendering%20problems%5D%28https%3A//github.com/apache/superset/issues/38076%23issuecomment-3922955086%29.%0A%0ASeveral%20PRs%20have%20addressed%20re-render%20issues%20with%20virtualization%20%28%5B%2336011%5D%28https%3A//github.com/apache/superset/pull/36011%29%2C%20%5B%2334975%5D%28https%3A//github.com/apache/superset/pull/34975%29%29%2C%20but%20images%20in%20Handlebars/Markdown%20components%20may%20still%20be%20affected%20since%20they%20don%27t%20have%20explicit%20image%20state%20preservation%20during%20unmount/remount%20cycles.%0A%0ACan%20you%20confirm%3A%0A-%20Vi rtualization%20is%20actually%20disabled%20after%20restart%3F%0A-%20What%20Node.js%20version%20you%27re%20running%3F) [](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/38244) GitHub link: https://github.com/apache/superset/discussions/38244#discussioncomment-15921135 ---- 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]
