Closed ghost closed 6 years ago
The path to the image should be relative to the current file.
For example, let's say this is your directory structure:
└── src
├── assets/images
│ └── logo.png
└── layout
└── theme.liquid
Inside layout/theme.liquid
, you'd need to refer to your image like so::
<img src="{{ '../assets/images/logo.png' | asset_url }}" />
console: https://www.dropbox.com/s/xi0znvyn365ig8u/Screenshot%202017-07-12%2016.00.20.png?dl=0
ive temporary fix it by changing webpack.base.conf.js line 63 from: { loader: 'file-loader', options: { name: '[name].[hash].[ext]' } }, to { loader: 'file-loader', options: { name: '[name].[ext]' } },
i know it will be proper to use:
<img src="{{ 'logo.png' | asset_url }}" />
but i receive compile error Module not found: Can't resolve './logo.png'even though image exists in /assets/images/logo.png