4

How can we enable Webp format for iOS and Android in an Expo project without ejecting.

Shivansh Jagga
  • 1,541
  • 1
  • 15
  • 24

1 Answers1

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