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

Image not downloading as PNG on iPad #287

Open
ClydeDz opened this issue Jun 26, 2022 · 10 comments
Open

Image not downloading as PNG on iPad #287

ClydeDz opened this issue Jun 26, 2022 · 10 comments

Comments

@ClydeDz
Copy link

ClydeDz commented Jun 26, 2022

Expected Behavior

I'm using toPng to download the React component as a PNG file on this app I built. It works great when I test it from my Windows PC. It should also work the same when I use this app from any browser on the iPad.

Current Behavior

When I click the "Download tweet as an image" button from an iPad device, it tries to download a document that's Zero KB. If I open that in the Downloads folder, it's still a document that's Zero KB instead of a PNG image. It has the randomly generated file name and tries to download a file with the name random-name.png.txt (in Safari) and random-name.png (in Chrome).

I'm not sure why it's appending .txt in Safari.

This behaviour can be tested on this site - https://clydedz.github.io/tweet-to-image/.

Possible Solution

Happy to try out any solutions provided, but I'm not sure what I could do here.

Steps To Reproduce

  1. Open the site https://clydedz.github.io/tweet-to-image/ on Chrome (and also try Safari) on your iPad device.
  2. Click on the "Download tweet as an image" button.
  3. Confirm if an image is downloaded or something else.
Error Message & Stack Trace

<!-- Provide a log message if relevant -->

Code

You could also look at this code block and fork this repository from this commit https://github.com/ClydeDz/tweet-to-image/tree/cff800e073722c7e2fb2888d25e55243f01da131.

Additional Context

IMG_0160
IMG_0161
IMG_0164
IMG_0165

Your Environment

  • html-to-image: 1.9.0
  • OS: iPad 8th gen 15.5
  • Browser: Chrome 103.05060.63
@ClydeDz ClydeDz added the bug label Jun 26, 2022
@vivcat
Copy link
Contributor

vivcat bot commented Jun 26, 2022

👋 @ClydeDz

Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it.
To help make it easier for us to investigate your issue, please follow the contributing guidelines.

We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.

@vivcat
Copy link
Contributor

vivcat bot commented Jul 17, 2022

Hiya!
This issue has gone quiet. Spooky quiet. 👻
We get a lot of issues, so we currently close issues after 60 days of inactivity. It’s been at least 20 days since the last update here. If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not-stale" to keep this issue open! As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request.

Thanks for being a part of the Antv community! 💪💯

@vivcat vivcat bot added the stale label Jul 17, 2022
@ClydeDz
Copy link
Author

ClydeDz commented Jul 17, 2022

Not stale. Still an issue.

@vivcat
Copy link
Contributor

vivcat bot commented Aug 8, 2022

Hiya!
This issue has gone quiet. Spooky quiet. 👻
We get a lot of issues, so we currently close issues after 60 days of inactivity. It’s been at least 20 days since the last update here. If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not-stale" to keep this issue open! As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request.

Thanks for being a part of the Antv community! 💪💯

@vivcat vivcat bot added the stale label Aug 8, 2022
@rooby
Copy link

rooby commented Sep 23, 2022

bump

1 similar comment
@danny-rangel
Copy link

bump

@qq15725
Copy link

qq15725 commented Feb 3, 2023

image

https://github.com/ClydeDz/tweet-to-image/blob/main/src/App.tsx#L38

change to pixelRatio: 2,

@BKranenburg
Copy link

Any updates?

@saianudeep18
Copy link

Do we have any update on this?

@Diego-Mike
Copy link

My client is facing this same problems on apple devices (tablet-phone), is there a workaround or solution ? or should i change this to html2canvas ?

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

No branches or pull requests

7 participants