Image Service
Our Image component knows how to handle wix static images.
You can either pass the imageId or the full url and we'll detect it's a Wix Statics image.
The component will automatically transform the image url to a smaller version by calculating other props like width/height/size/mode (by default the maximum size will be the device size)
This is done in order to reduce the time and size of images downloaded to the device.
Prefetch
Use the static prefetch method with the transformed image source to prefetch it before loading the actual screen containing the images.
How to get the transform image source manually?
import {ImageService} from '@wix/wix-react-native-ui-lib'
const imageSource = ImageService.getImageSource({
source: ...,
width: ...,
height: ...
});
Image.prefetch(imageSource);
info
Notice that the Image component do this internally, use ImageService.getImageSource for special cases only