Totally new to F7. I’m coming from a traditional web development background, and a lot of this is new to me. Sadly, I’m finding the tutorials inconsistent and incomplete.
I’m simply trying to display an image, but I can’t find anywhere in the docs where I should be placing my image files and how to reference them.
I’ve tried putting them in ./assets-src/images/, ./src/assets/images, ./public/images/ and a few other random spots, but my test app can’t find them.
How and where do I put my image files?
@12Centuries Place your images in a /public/images/ directory
That’s where the build process expects them to be.
Then reference as follows:
<img src="/images/your-image.jpg" />
Thank you! Do you happen to know where this is in the documentation?
@12Centuries In my case it’s in the Vite build documentation, since that’s the bundler I’m using. In other cases it my be different. The settings are in
I had the same question as you, but saw that the app icons were all in
/public/ so I figured images would go in the same place.