-
Notifications
You must be signed in to change notification settings - Fork 77
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
Images without file extensions don't appear #41
Comments
Do you have an example URI ? |
Here's one: https://s3.amazonaws.com/timemachinemedia/00081e4c6376f8abb5305d447d8c378d_file Thanks for looking into this! |
When I click this link in the browser, it tries to download. Doesn't that mean the URL is returning the incorrect mime/type? If it was an image shouldn't the browser display it ? |
Hey @jayesbe you are probably right. The image was just uploaded as a blob of data to Amazon S3. Apparently AWS has no way of bulk-updating the HTTP headers that are served along with the file. It makes sense that the browser can't download the entire file automatically and then inspect it to see what to do with it. But in the case of using a component like I ended up using this instead because it "just works" like |
I've found that iOS will not display a local image without an extension because it assumes PNG. More details here: #23 (comment) The fix for this is to append an extension to the cached copy if one doesn't exist. The library you linked appends 'jpg' to any file without an extension: https://github.com/kfiroo/react-native-cached-image/blob/master/ImageCacheProvider.js#L41 |
Interesting... thanks @nbolender ! I wonder if |
Thanks, @nbolender ! You saved my time |
With
<Image>
, the source URI doesn't need a file extension to be recognized and rendered properly as an image. I just tested<ResponsiveImage>
and that also works.The text was updated successfully, but these errors were encountered: