I want to show a .svg image which is in the assets directory in my src
directory.
Here is a glimpse of the folder structure -
I want to get the balloons.svg
from the Register.tsx
.
I am using the IonImg
element and have tried directories like ../assets/balloons.svg
as source but they doesn't seem to work.
Note: The image appears properly if I use an image URL as source.
I recommend locate using "require" in Ionic react.
So try:
like: