React-native-image-viewer: No suitable image URL loader found for (null) on iOS

Created on 21 May 2018  ·  14Comments  ·  Source: ascoders/react-native-image-viewer

I get this error message on iOS:

No suitable image URL loader found for (null)

-[RCTImageLoader _loadURLRequest:progressBlock:completionBlock:]
RCTImageLoader.m:439

__118-[RCTImageLoader _loadImageOrDataWithURLRequest:size:scale:resizeMode:progr...

My code looks like this:

<ImageViewer
  imageUrls={[
    {
      props: {
        source: require('src/assets/images/map.png')
      }
    }
  ]}
  renderIndicator={() => null}
/>

Most helpful comment

By adding an empty url solved my problem.

{
        url: '',
        props: {
            source: require("./img_other.png")
        }
},

All 14 comments

Hi @jakewtaylor ,thanks for report this bug, can you upload the src/assets/images/map.png? i'll try to reproduce this issue.

Here you go:

map

image

@janlonden It work fine until i renamed it in whole english words. Here is my config:

{
  props: {
    source: require("./img_other.png")
  }
}

I guess this problem was not caused by this library? Try to rename it, or use relative path.

你好我也出现了这种情况,配置什么都是照着复制粘贴的,也是在ios上在使用source属性的时候报这个错,有什么解决方法吗?

@ascoders I've tried using a relative path, other file formats and file names, but nothing helps.

Thank you for your time.

You can clone this project, and run in expo, the doc is here. The demo entry is demo/App.js.

I'm sorry, because I can't resume it now, i haven't got a clue yet.

+1 I get this issue
have any solution?

+1 I get this issue

@airingursb @yasinugrl Sorry i can't reproduce this issue, you can fork this repo, and reproduce this bug by changing demo source code.

Develop docs.

@ascoders I have solved the problem. It's my fault. Sorry.

By adding an empty url solved my problem.

{
        url: '',
        props: {
            source: require("./img_other.png")
        }
},

maybe should update readme hhh~

This readme is a JOKE, could you please add all information about object properties needed for this: <ImageViewer imageUrls={images}/>

image

I'm already added this, if there is something else, it's awesome to send a PR 💗。

Was this page helpful?
0 / 5 - 0 ratings

Related issues

gucaoyouxiang1 picture gucaoyouxiang1  ·  5Comments

Larva02 picture Larva02  ·  5Comments

paolospag picture paolospag  ·  3Comments

nicomontanari picture nicomontanari  ·  5Comments

herarya picture herarya  ·  6Comments