Open NilsBaumgartner1994 opened 2 years ago
Forget this library, its no longer maintained.
Instead, use
import { SvgUri } from 'react-native-svg';
export default function ComponentWithSvg() {
return (
<SvgUri
width="28"
height="28"
uri="https://avataaars.io/?avatarStyle=Transparent&topType=LongHairMiaWallace&accessoriesType=Kurt&hairColor=BlondeGolden&facialHairType=BeardMedium&clotheType=GraphicShirt&clotheColor=Black&eyeType=Happy&eyebrowType=AngryNatural&mouthTy"
/>
);
}
@hellohellosharp You can't use a dynamic URL to display an SVG image. To display an SVG image you need a direct link.
This is a blank component:
<SvgUri
width="28"
height="28"
uri="https://avataaars.io/?avatarStyle=Transparent&topType=LongHairMiaWallace&accessoriesType=Kurt&hairColor=BlondeGolden&facialHairType=BeardMedium&clotheType=GraphicShirt&clotheColor=Black&eyeType=Happy&eyebrowType=AngryNatural&mouthTy"
/>
updated package that works on RN 0.70.6: https://github.com/JacobDel/react-native-avataaars