I'm trying to add a simple <img src="..." to my app. I have placed myimg.png in the static folder. When I set the image source to simply myimg.png, everything works in dev mode, but the image does not show up in production (presumably since it's in a resources subfolder).
On the other hand, if I prefix the filename with __static, it works in production mode, but in debug mode I get the following error in Chrome DevTools:
Not allowed to load local resource: file:///<repo folder>/static/myimg.png
How are we supposed to use simple images?
I'm trying to add a simple
<img src="..."
to my app. I have placedmyimg.png
in thestatic
folder. When I set the image source to simplymyimg.png
, everything works in dev mode, but the image does not show up in production (presumably since it's in aresources
subfolder).On the other hand, if I prefix the filename with
__static
, it works in production mode, but in debug mode I get the following error in Chrome DevTools:Not allowed to load local resource: file:///<repo folder>/static/myimg.png