webpack-static-html-pages icon indicating copy to clipboard operation
webpack-static-html-pages copied to clipboard

Using images

Open El-Tommy opened this issue 3 years ago • 1 comments
trafficstars

I didn't quite understand the use of images.

I'm putting the images inside the ./src/img folder. Every time I need to use an image on a page, do I need to do a <%= require('../img/image-name.svg') %> ?

And how do I put images inside the partials? Even with require I couldn't make it work.

El-Tommy avatar Aug 12 '22 14:08 El-Tommy

Have you tried this way? Just one '.'

<%= require('./img/image-name.svg') %>

RandyBooth avatar Aug 17 '22 14:08 RandyBooth

"about" page template contains 2 examples on how to add images https://github.com/ivarprudnikov/webpack-static-html-pages/blob/master/src/page-about/tmpl.html

ivarprudnikov avatar Nov 10 '22 13:11 ivarprudnikov