ngx-image-compress
ngx-image-compress copied to clipboard
Issue using with Ionic: I get black images from camera and gallery
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.
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
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