Skip to content
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

images in DOM are not converting into base64 #362

Open
Talal0 opened this issue Dec 9, 2020 · 4 comments
Open

images in DOM are not converting into base64 #362

Talal0 opened this issue Dec 9, 2020 · 4 comments

Comments

@Talal0
Copy link

Talal0 commented Dec 9, 2020

I'm using dom-to-image in ionic4 project it is working fine in android but in iOS is not converting showing blank space inside container

@Talal0 Talal0 changed the title images are not converting into base64 images in dom are not converting into base64 Dec 9, 2020
@Talal0 Talal0 changed the title images in dom are not converting into base64 images in DOM are not converting into base64 Dec 9, 2020
@csandman
Copy link

According to the readme, Safari is not supported:

Safari is not supported, as it uses a stricter security model on <foreignObject> tag. Suggested workaround is to use toSvg and render on the server.`

https://github.com/tsayen/dom-to-image#browsers

I would assume this goes for both MacOS and iOS

@Ginhing
Copy link

Ginhing commented Jan 13, 2021

Solved this issue by translate the network image into base64 by canvas.toDataURL before using dom-to-image on safari

@nattapat-cop
Copy link

@Ginhing can you show example i have same problem for image it already base64 but still showing blank space

@jijojosein
Copy link

Had the same issue on Safari. Used SVG instead of png and the issue was solved.

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

5 participants