How can we enable Webp format for iOS and Android in an Expo project without ejecting.
Asked
Active
Viewed 365 times
1 Answers
2
it works on expo Go. you can check: https://snack.expo.dev/6T9fiBmZL
maybe you forgot to add height
width
Code
import React from 'react'
import { StyleSheet, View,Image } from 'react-native';
const App = () => {
return (
<View style={styles.container}>
<Image source={{uri:"https://www.gstatic.com/webp/gallery/1.sm.webp"}} style={{height:200,width:200}} />
</View>
);
};
const styles = StyleSheet.create({
container: {
flex:1,
justifyContent:"center",
alignItems:"center",
},
});
export default App

Muhammad Numan
- 23,222
- 6
- 63
- 80