facebook / react-native

A framework for building native applications using React
https://reactnative.dev
MIT License
119.28k stars 24.35k forks source link

Images on Android only extremely low quality. #32411

Open pateljoel opened 3 years ago

pateljoel commented 3 years ago

Description

I am trying to load high quality images in React Native for a chart application and I am getting low quality images being displayed on Android, Zooming in does not help either, instead it makes the issue worse. iOS is fine, but viewing the same image on Android gives dire results and does not look the same quality as iOS.

I have attached an Expo snack example so that you can compare and Zoom in to see the issue.

Screenshot 2021-10-15 at 16 13 14

React Native version:

0.66

Steps To Reproduce

Provide a detailed list of steps that reproduce the issue.

  1. Use a high quality PNG image.
  2. Load the image in an Image Viewer or Image Tag.

Expected Results

Describe what you expected to happen.

I expect the image quality to be the same regardless of the platform.

Snack, code example, screenshot, or link to a repository:

https://snack.expo.dev/@joelpateljp/low-quality-image-android-example

pateljoel commented 3 years ago

I’m sure I’m not the only one having this serious issue on Android, has there been any movement on this?

pateljoel commented 3 years ago

Can you fix this issue? @ManishOffi

pateljoel commented 2 years ago

Is there any update on this?

wayne-tt commented 2 years ago

My rn version is 0.63.

I got the same issue when I use big size an image.

wayne-tt commented 2 years ago

It is facebook/fresco issue.

pateljoel commented 2 years ago

@wayne-tt I wrote a comment and the same Expo snack on the facebook/fresco repo https://github.com/facebook/fresco/issues/2397#issuecomment-993714092

AKHACKER-program4hack commented 2 years ago

I am facing the same problem if you got the solution then please share it with me

tez123z commented 2 years ago

Same issue rn version is 0.64.3.

liviu-padurariu commented 2 years ago

Same issue in "react-native": "0.68.0".

saruults commented 2 years ago

same issue 0.64.3

bodrius commented 2 years ago

same issue 0.64.3

Jablek98 commented 2 years ago

Does anyone know whether the problem also exists using JPG images?

evelant commented 1 year ago

Still a bug in 0.71.2. This has been a bug for many years before this particular issue was filed. (see https://github.com/facebook/fresco/issues/2397 https://github.com/facebook/react-native/issues/21301 etc).

Unfortunately over the years it hasn't been able to grab anyone at Facebook's attention who might know how to resolve it and community efforts haven't uncovered the source either. Some people have luck using react-native-fast-image or the new expo-image both of which use glide instead of fresco for handling the images on android.

It's a really difficult bug to deal with if you need to render high resolution images on Android. What's more frustrating is that everything works perfectly on iOS. At this point however after ~5 years of this bug being reported with no fix I think it's safe to say it's in the "won't fix" category and you're better off trying a workaround.

timoisalive commented 1 year ago

Comment on the new Expo Image prop: https://github.com/facebook/fresco/issues/2397#issuecomment-1527009797

pateljoel commented 1 year ago

I had a look and I can only see this PR https://github.com/facebook/fresco/pull/2500 which aims to solve the low quality issue here: https://github.com/facebook/fresco/issues/2397 but I haven't tried it yet.

This issue is very critical since images on Android is the only platform that has this very low quality images.

If anyone has any update or workaround, this would be very welcome.

pateljoel commented 9 months ago

@evelant Looks like this is making some progress here that might lead to this issue being resolved on fresco's side. https://github.com/facebook/fresco/pull/2500

react-native-bot commented 3 months ago

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.

evelant commented 3 months ago

Not sure if this is resolved or not yet