LoginSignup
0

More than 5 years have passed since last update.

ReactNativeでローカルに保存された画像を表示する

Posted at

ExpoのCameraコンポーネントからローカルファイルシステムに保存した画像のURIを取得できるが、file:// プロトコルなURIをそのままImageのsourceとして指定してもうまくいかない。

<Image style={{width: 100, height: 100}} source={{isStatic:true, uri:"file://var.....}} />

isStatic: trueを指定すると表示ができる。もちろんネットワーク上から取得した画像のように、widthとheightの指定も必要になる。

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0