ngx-image-compress icon indicating copy to clipboard operation
ngx-image-compress copied to clipboard

Issue using with Ionic: I get black images from camera and gallery

Open ionic2022 opened this issue 2 years ago • 2 comments

I'm using this plugin for compression in an ionic project, and whenever I upload images from the camera or gallery, I get black images. I used the ionic camera plugin for the camera and gallery. Please assist or guide me in resolving this matter as soon as possible.

ionic2022 avatar Apr 05 '22 13:04 ionic2022

please try without ionic plugin Just use the function uploadImage and it should do the work

if you need to use ionic plugin absolutly, you need to pass into compressImage a proper data url, it's a string basically, encoded in base 64. Use console log to see what ionic plugin is returning and modify the string accordinly.

If this comment helped you please copy paste your code here so other could see how our library is working with ionic. I know this is working, because at the beginning this library was meant to be use with ionic plugin only.

please check with https://image-compress.app

dfa1234 avatar Apr 08 '22 10:04 dfa1234

Facing same issue. But I am directly using compress file method. Issue happening after upgrade to Angular 14 to 16 & Browser Upgrade from Firefox 78 to 119

arslanali143 avatar Dec 16 '23 07:12 arslanali143