mattwaler / tea-stack

A starter template for the TEA stack (Tailwind, Eleventy, Alpine).

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

images: how should I manage the images ?

pascalandy opened this issue · comments

I tried to create /src/assets/img/logo.svg

Then, I used:

          <div>
            <img src="/_assets/img/logo.svg" class="h-7 sm:h-8" />
          </div>

but it does not work.

It would be nice to have an example.
Thanks!

Hello @pascalandy!

Thanks for trying out the TEA stack repo! I can help you with your image problem.

Place all of your static files inside the public folder. This will get copied as-is into your dist build folder as you develop!

For example, if you created the path and file:
public/images/test.jpg

You would link to it in your html like this:
<img src="/images/test.jpg">

That's it! Thank you very much :)