Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

347
Views
My custom css and image wont load when deployed on Heroku but loads fine when i run a local server. I searched everything and cannot find any errors

I've checked everything, the path is correct , I've already declared the the "public" folder for the static files. please help me figure it out. this is how it should look

this is the site when I run it in my local server, everything loads fine here.

But when I added and deployed it on Heroku, this is how it looks

There's no image and custom CSS, only bootstrap loaded correctly, which is not stored locally

I get this error for the image: GET https://glacial-retreat-59003.herokuapp.com/images/download.jpg 404 (Not Found)

and this one for the css: Refused to apply style from 'https://glacial-retreat-59003.herokuapp.com/css/styles.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.

I googled them all but none of the solutions worked, plus the errors seem like are caused due to not correctly writing directory/path for the files, but I checked several times and that's not the case.

this is the .js file , to show the directories I added are correct

app.use(express.static("public/"));

this is the HTML file , where i added css file and image

<link href="css/styles.css" rel="stylesheet" type="text/css">



<img class="mb-4 img" src="images/download.jpg" alt="" >
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!