html-to-image icon indicating copy to clipboard operation
html-to-image copied to clipboard

Image not downloading as PNG on iPad

Open ClydeDz opened this issue 3 years ago • 10 comments

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 avatar Jun 26 '22 06:06 ClydeDz

👋 @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.

biiibooo[bot] avatar Jun 26 '22 06:06 biiibooo[bot]

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! 💪💯

biiibooo[bot] avatar Jul 17 '22 02:07 biiibooo[bot]

Not stale. Still an issue.

ClydeDz avatar Jul 17 '22 10:07 ClydeDz

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! 💪💯

biiibooo[bot] avatar Aug 08 '22 01:08 biiibooo[bot]

bump

rooby avatar Sep 23 '22 04:09 rooby

bump

danny-rangel avatar Dec 24 '22 04:12 danny-rangel

image

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

change to pixelRatio: 2,

qq15725 avatar Feb 03 '23 14:02 qq15725

Any updates?

BKranenburg avatar Dec 17 '23 11:12 BKranenburg

Do we have any update on this?

saianudeep18 avatar Feb 26 '24 08:02 saianudeep18

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 ?

Diego-Mike avatar Mar 27 '24 02:03 Diego-Mike