numandev1 / react-native-compressor

🗜️Compress Image, Video, and Audio same like Whatsapp 🚀✨

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

On image compression android error Width and height must be > 0

sreedevi111 opened this issue · comments

Current behavior

On compressing image with local path (eg: /Users/Desktop/checkImage.png), getting error on android like
Width and height must be > 0. In ios it is working fine

Expected behavior

Image need to be compressed.

Platform

  • Android

React Native Version

0.73.6

React Native Compressor Version

^1.8.24

Reproducible Steps And Demo

useEffect(() => {
const fetchData = async() => {
try{
const result = await Image.compress('Users/Downloads/image.jpg', {
returnableOutputType: uri
})
console.log("Result", result)
}
catch (e){
console.log("Error", e)
}
fetchData()
},[])

👋 @sreedevi111
Thanks for opening your issue here! If you find this package useful hit the star🌟!