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

288
Vistas
nextjs how to display svgs in both ways as img and as react component?

I am using NEXT.js.

I added [SVGR][1] into project in order to use SVGs as react components.

The problem is cus in some places I want to use SVGS as img, and svgr not support that, which means all my svgs that are displayed in <img tag is not shown.

How to make a next.config to support both way of displaying SVG in a img and as react component?


module.exports = withSvgr({
  webpack: (config) => {
    config.resolve.fallback = {
      http: false,
      https: false,
    };
    config.resolve.modules.push(path.resolve('./'));
    return config;
  },

});

https://react-svgr.com/docs/next/

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