npx create-expo-app expo-image-onlayout
cd expo-image-onlayout
npx expo install react-dom react-native-web @expo/metro-runtime
npx expo install expo-image
Add the example code from https://docs.expo.dev/versions/latest/sdk/image/#usage and include the onLayout callback:
<Image
onLayout={(event) => {
console.log("Doesn't work on web", event);
}}
...
/>
npm install
npx expo start --web
The error can be seen in the developer console Unknown event handler property 'onLayout'. It will be ignored.