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

Image not shown in web #1587

Closed
pefuer opened this issue May 12, 2021 · 5 comments
Closed

Image not shown in web #1587

pefuer opened this issue May 12, 2021 · 5 comments

Comments

@pefuer
Copy link

pefuer commented May 12, 2021

Hey guys,

Maybe you can help me with an issue with the Image component of your library. I am trying to use a png/jpg file as background for a svg. This works fine on Android, but the images are not shown in a web browser.

Bug

Maybe it's a bug. If not I'd be happy if you could explain me how to properly reference images such that they're also shown in the browser.

Unexpected behavior

The behavior can be observed here: https://snack.expo.io/@pefue/image-demo

No images are shown when targeting 'web'. Images are shown when for example targeting Android.

Web

Web

Android

Android

Workaround in Example Snack

The react-native-svg-example has a workaround (https://snack.expo.io/@msand/react-native-svg-example).
In the example, two additional components SnackImageCompat.js and SnackImageCompat.web.js are used as wrappers for Image. However, this workaround appears to not work anymore with more recent Expo versions. One can get it running by choosing Expo v38.0.0. Unfortunately I did not succeed in fixing the workaround.

@molchanovskiy
Copy link

Same for me!
@pfuersattel Did you found any solutions?

@pefuer
Copy link
Author

pefuer commented Jul 7, 2021

@molchanovskiy sorry, I wasn't able to figure out a workaround. Anyone else?

@jimmi-joensson
Copy link

Experiencing the same issue

@Estevete
Copy link

Any update on this?

@bohdanprog
Copy link
Member

Hello @pefuer @molchanovskiy @jimmi-joensson @Estevete,
I tried to reproduce that but couldn't.
I believe the issue has already been resolved. If you are still experiencing problems, please feel free to open a new one.
Thank you.

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

5 participants