App: [HOLD for payment 2024-04-15] [$500] Investigate and address Image.getSize / react-native-image-size discrepancy

Problem

We currently have an unused dependency in this project - react-native-image-size. This is problematic because it unnecessarily bloats our application, and we’ve invested time in upgrading it to the New Arch.

Meanwhile, there’s a reason we added it in the first place - it solves a problem with Image.getSize and the underlying Fresco image lib where large Android images are downsampled recent example, producing incorrect results on Android.

It’s unclear the degree to which this affects our end-users, but it seems like we should do something.

Solution

  • Remove all uses of Image.getSize, replace them with react-native-image-size
  • Use ESLint rules to prevent further usage of Image.getSize, in favor of react-native-image-size.
Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~017637a44480adad34
  • Upwork Job ID: 1775302211863654400
  • Last Price Increase: 2024-04-02
Issue OwnerCurrent Issue Owner: @anmurali

About this issue

  • Original URL
  • State: closed
  • Created 3 months ago
  • Comments: 16 (7 by maintainers)

Most upvoted comments

@anmurali the PR was deployed to staging 12 hours ago. Assuming no regressions, the only payment due here would be $500 to @ishpaul777 for the C+ review

I reviewed this PR. Can i be assigned to this issue for tracking of payment @roryabraham 🙇‍♂️

There is 1 open issue here where I propose to replace Image.getSize with react-native-image-size in AttachmentPicker/index.native.js.