Skip to content

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

Closed
@sreedevi111

Description

@sreedevi111

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()
},[])

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions