ローカルイメージの高さを取得して、React-Nativeで拡大しようとしています。次のコードを試しましたが、Failed to get size for image: ../../images/body.png
エラーが発生します。ローカルイメージのサイズを取得できません
scaleImg(h) {
Image.getSize('../../images/body.png', (width, height) => {
const scaleFactor = height/h
const imageWidth = width/scaleFactor
this.setState({imgWidth: imageWidth, imgHeight: h})
})
}