question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't resolve static files

See original GitHub issue

I’m getting a warning whenever I try to use static files (e.g. in the src attribute of an img tag):

post.html:

...
<img src="image.jpg" alt="example image" />
...

output:

warning Could not resolve image.jpg inside of 'static/' dir: won't be included in output build.

This is despite having a static folder in the root directory with image.jpg inside.

I get a similar error even when I add a / and move the image.jpg file outside of the static folder:

post.html:

...
<img src="/image.jpg" alt="example image" />
...

output:

warning Could not resolve /image.jpg: won't be included in output build.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
mjrlowecommented, Aug 15, 2020

Yes, it has that exact structure (as well as an empty templates folder and a generated dist folder). I’ll have a closer look later but I’m currently away from my computer so that may be in a while.

0reactions
mjrlowecommented, Aug 29, 2020

Thank you! I think this fixed it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Static files do not resolve · Issue #1013 · nuxt/framework
I can resolve /public/nuxt.png (with a warning in my console: files in the public directory are served at the root path. Instead of...
Read more >
Django CAN find my static files, Pycharm CANNOT resolve ...
Here is the key to solving the problem: Pycharm needs to know where your settings files that you're currently using is located.
Read more >
Django can't see my static files
Hello All, I'm using Django to develop a website, and I'm having trouble getting it to see my static files. I've looked through...
Read more >
Set Up Webpack To Work With Static Files
In this tutorial, I'm gonna show you how you can configure a webpack if you want to serve static files in your application....
Read more >
How to manage static files (e.g. images, JavaScript, CSS)
Configuring static files¶ · Make sure that django.contrib. · In your settings file, define STATIC_URL , for example: · In your templates, use...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found