diegomedina248 opened a new pull request, #20362: URL: https://github.com/apache/superset/pull/20362
### SUMMARY Users can add Markdown to their Dashboards, which allow to include images using `<img src="$link">`. However, if the Dashboard has an image added this way, the Download as image functionality will fail. The problem is that, depending on where do we source the image from, we could run into CORS issues. That, however, show not make the image generation fail. The library that we use, `dom-to-image`, is pretty much deprecated and hasn't received updates for a long while. This PR replaces the library for a fork that's been rewritten and well maintained: `dom-to-image-more`. The library does not fail, and instead shows a placeholder if it can't fetch the image. ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF Before: https://user-images.githubusercontent.com/17252075/173392024-12b0cfb4-a5a6-4067-9c8f-d3cb680bd219.mov After: https://user-images.githubusercontent.com/17252075/173392092-46384421-d0cd-4331-a5b1-c156dd6b99c2.mov ### TESTING INSTRUCTIONS 1. Access your Workspace. 2. Create a new Dashboard. 3. Add a Markdown element to it. 4. Add below code to your Markdown: ``` <img src="https://repository-images.githubusercontent.com/39464018/58649580-eca4-11ea-844d-c2ddca24b226"> ``` 5. Save your changes. 6. Click on the three ellipses > Download as image. Ensure the dashboard image is generated. ### ADDITIONAL INFORMATION - [ ] Has associated issue: - [ ] Required feature flags: - [x] Changes UI - [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351)) - [ ] Migration is atomic, supports rollback & is backwards-compatible - [ ] Confirm DB migration upgrade and downgrade tested - [ ] Runtime estimates and downtime expectations provided - [ ] Introduces new feature or API - [ ] Removes existing feature or API -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
