diff --git a/Libraries/Image/Image.android.js b/Libraries/Image/Image.android.js index bd5b0bd16..c56fa2ce1 100644 --- a/Libraries/Image/Image.android.js +++ b/Libraries/Image/Image.android.js @@ -220,7 +220,14 @@ var Image = React.createClass({ */ async queryCache(urls: Array): Promise> { return await ImageLoader.queryCache(urls); - } + }, + + /** + * Resolves an asset reference into an object which has the properties `uri`, `width`, + * and `height`. The input may either be a number (opaque type returned by + * require('./foo.png')) or an `ImageSource` like { uri: '' } + */ + resolveAssetSource: resolveAssetSource, }, mixins: [NativeMethodsMixin], diff --git a/Libraries/Image/Image.ios.js b/Libraries/Image/Image.ios.js index 04c78d6cb..012aa09ad 100644 --- a/Libraries/Image/Image.ios.js +++ b/Libraries/Image/Image.ios.js @@ -317,6 +317,12 @@ const Image = React.createClass({ prefetch(url: string) { return ImageViewManager.prefetchImage(url); }, + /** + * Resolves an asset reference into an object which has the properties `uri`, `width`, + * and `height`. The input may either be a number (opaque type returned by + * require('./foo.png')) or an `ImageSource` like { uri: '' } + */ + resolveAssetSource: resolveAssetSource, }, mixins: [NativeMethodsMixin],