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

186
Vistas
next/image fails to work when converting project from JavaScript to TypeScript

I'm working on converting my personal website from a Next.js JavaScript to TypeScript project. Previously I had a placeholder background image loaded with the next/image system:

<Image
    src="/filename.jpg"
    layout="fill"
    objectFit="cover"
    quality={100}
/>

I am not using a loader at the moment. This successfully loaded, if a bit slow. I moved to TypeScript with no changes to that line or related lines, but am now getting a 502 (Bad Gateway) error when attempting to load the image.

If I modify the URL to a nonexistent file like "/falename.jpg" then I instead get a 400 (Bad Request) error. That seems to indicate that the file access is fine, but it's somehow not loading correctly in TypeScript only.

Is there some setup step that I am missing? I've combed through all of Next.js's next/image and TypeScript guides and haven't noticed anything of the sort.

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Turns out the transition to TypeScript put some sort of cap on image file size; I tried using lower resolution images and that worked.

about 4 years ago · Juan Pablo Isaza Denunciar
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