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

203
Vistas
Konva: Load SVG from url

I found I have to use img-use to load image to a layer in konva. It work for jpg and png, but not for svg. What else I can do to have one layer with an SVG?

import useImage from "use-image";
  const [backgroundImage] = useImage(
    `https://ticket-t01.s3.eu-central-1.amazonaws.com/madach-2.svg` || ""
  );

Actually it loads the image bit it is very pixelated. Shall I save diffrently the SVG when re-exporting from Illustrator?

enter image description here

<Stage
  width={
    gridWidth ? (gridWidth >= 600 ? gridWidth : gridWidth) : 200
  }
  height={
    layout && gridWidth
      ? Math.round(gridWidth / layout.aspectRatio)
      : 200
  }
>
  <Layer>
    <Rect
      x={0}
      y={0}
      width={gridWidth || 200}
      height={
        layout && gridWidth
          ? Math.round(gridWidth / layout.aspectRatio)
          : 200
      }
      fillPatternImage={backgroundImage}
      fillPatternRepeat="no-repeat"
      fillPatternScale={{
        x: (gridWidth || 200) / (backgroundImage?.width || 200),
        y:
          (layout && gridWidth
            ? Math.round(gridWidth / layout.aspectRatio)
            : 200) / (backgroundImage?.height || 200),
      }}
    />
  </Layer>
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