Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

344
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda