Skip to content
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

[Android] Some image files are not loadable by Image component #20420

Closed
3 tasks done
kriskate opened this issue Jul 27, 2018 · 4 comments
Closed
3 tasks done

[Android] Some image files are not loadable by Image component #20420

kriskate opened this issue Jul 27, 2018 · 4 comments
Labels
Bug Component: Image Platform: Android Android applications. Resolution: Locked This issue was locked by the bot.

Comments

@kriskate
Copy link

Environment

React Native Environment Info:
    System:
      OS: macOS High Sierra 10.13.6
      CPU: x64 Intel(R) Core(TM) i5-5257U CPU @ 2.70GHz
      Memory: 1.94 GB / 8.00 GB
      Shell: 5.3 - /bin/zsh
    Binaries:
      Node: 10.6.0 - /usr/local/bin/node
      npm: 6.1.0 - /usr/local/bin/npm
      Watchman: 4.6.0 - /usr/local/bin/watchman
    SDKs:
      Android SDK:
        Build Tools: 23.0.1, 25.0.0, 25.0.2, 26.0.1, 26.0.3, 28.0.0
        API Levels: 23, 25, 26
    IDEs:
      Xcode: /undefined - /usr/bin/xcodebuild
    npmPackages:
      react: 16.4.1 => 16.4.1
      react-native: 0.56.0 => 0.56.0
    npmGlobalPackages:
      react-native-cli: 2.0.1

Tested on

  • react-native 0.56 on emulator Android 7.1.1
  • Galaxy S8 Android 8.0.0

Description

Some images won't load in component Image.

I've tried the following:

  1. prefetch() the image (btw this should probably throw an error if failed)
  2. download locally and use as native module - throws exception "Cannot find module - no such file"

The only difference I found between a loadable image and a not-loadable one is their Color profile and Alpha channel definitions:

// not loadable: 
Color profile: -
Alpha channel: no

// loadable:
Color profile: sRGB IEC61966-2.1
Alpha channel: Yes

screen shot 2018-07-26 at 23 24 12

Reproducible Demo

Here is a snack

@react-native-bot react-native-bot added the Platform: Android Android applications. label Jul 27, 2018
@TheRohitSharma
Copy link

Encountering the same issue. Any updates?

@kriskate
Copy link
Author

My solution was to re-encode the images (with a free online converter, don't remember which though), and re-upload the new version.

@stale
Copy link

stale bot commented Jan 16, 2019

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as "For Discussion" or "Good first issue" and I will leave it open. Thank you for your contributions.

@stale stale bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Jan 16, 2019
@stale stale bot removed the Stale There has been a lack of activity on this issue and it may be closed soon. label Jan 26, 2019
@hramos hramos removed the Bug Report label Feb 6, 2019
@Salakar
Copy link
Contributor

Salakar commented Apr 10, 2019

👋 hey all, thanks for reporting this issue.

Please, could you confirm if this is still an issue with the latest version of React Native?

Also, I'd suggest that making this issue over at https://github.com/facebook/fresco is probably a better place for this to be; Fresco is used internally by React Native for images on Android.

Thank you

@Salakar Salakar closed this as completed Apr 10, 2019
@facebook facebook locked as resolved and limited conversation to collaborators Apr 10, 2020
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Apr 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Component: Image Platform: Android Android applications. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

5 participants