DEV Community

shyam manek
shyam manek

Posted on

React Native Display Image SVG examples


import { Image } from 'react-native';

<Image
    resizeMode="contain"
    style={styles.headerImage}
    source= {{uri: 
"https://www.google.com/url?sa=i&url=https%3A%2F%2Fpixabay.com%2Fimages%2Fsearch%2Fnature%2F&psig=AOvVaw1Hnk20FKp4R6eU6GwbUTL7&ust=1672469361872000&source=images&cd=vfe&ved=0CA8QjRxqFwoTCKi5nYPgoPwCFQAAAAAdAAAAABAE"}}    //u can use any file
 />


Enter fullscreen mode Exit fullscreen mode

This is For SVG

import {SvgUri} from 'react-native-svg';

<SvgUri 
  style={styles.footerIcon}
  width={50}
  height={50}                       
  uri="https://d2h44aw7l5xdvz.cloudfront.net/assets/zero.svg"
/>



Enter fullscreen mode Exit fullscreen mode

Top comments (0)