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

199
Views
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
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!