So I've migrated my Rails application over to Webpack but I'm having trouble loading image assets. In the Webpacker documentation it states that I can load my assets using the following:
<img src="<%= asset_pack_path 'images/logo.svg' %>" />
But this doesn't seem to be compiled down when I run
My folder structure looks like so
I'm not great at this new Webpack stuff but I assume it has something to do with my
Has anyone experienced this before? There seems to be little advice on the internet.
I think I can resolve this by manually importing the images from inside my
So for example;
Then lets me reference this using the
Still if somebody can tell me a better way i'd really appreciate it.
©2020 All rights reserved.