Skip to content

Quality parameter doen't work #347

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
2 tasks done
aaroncornelissen opened this issue May 7, 2025 · 1 comment
Open
2 tasks done

Quality parameter doen't work #347

aaroncornelissen opened this issue May 7, 2025 · 1 comment

Comments

@aaroncornelissen
Copy link

Current behavior

We compress images in our app. We use the maxWidth and the maxHeight combined with the quality. The images are getting compressed, so that is great. We're only experiencing that the quality parameter setting makes no difference. The compression result stays the same if we use 0.1 of 0.9.

 const compressedFileUri = await Image.compress(file.uri, {
      maxWidth: 2000,
      maxHeight: 2000,
      quality: 0.9,
      input: 'uri',
    });

Expected behavior

More compression when the quality is lower

Platform

  • Android
  • iOS

React Native Version

0.75.5 old arch

React Native Compressor Version

1.10.1 (also tested with 1.11.0

Reproducible Steps And Demo

  • Compress an image with the parameters from the description
  • Change the quality to a lower number
  • Compare both files, quality and size are equal
Copy link

github-actions bot commented May 7, 2025

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant