0

I am using react native 0.73 and trying to use remote svg images. SVG url https://hdor.com/app/assets/images/hdor-2021-icons/badges/bw/25km.svg this is the url which i am trying to use in my application. However it is not working.

Please let me know if i am doing wrong or missing something.

Thank you !! Pawan

import {View, StyleSheet, Image} from 'react-native';
import React from 'react';
import {SvgUri} from 'react-native-svg';
const ShowBadgesUI=({bwBadge})=>{
  return (
    <View style={{...imageShowStyle.imageContainer}}>
  

      <SvgUri
        uri={bwBadge}
        onLoad={() => console.log('alkdkasj')}
        style={{
          width: 50,
          height: 50,
          backfaceVisibility: 'hidden',
        }}
      />
    </View>
  );
};

export default ShowBadgesUI;

2
  • 1) are there any error messages? 2) what happens if you remove the inline style and use the HTML attributes width="100%" and height="100%"? 3) Have you tried putting the url in as a static string instead of a variable? 4) Is the ShowBadgesUI component definitely being displayed on the UI? Commented Jun 6, 2024 at 15:03
  • Thanks for your reply it get resolved as there is some issues in sag image itself which is not working as expected. Commented Aug 29, 2024 at 3:14

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.