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

90
Views
canvas not adding image from url (base 64)

i am working on project where i want to create a min preview for canvas. so when any change happen to canvas eg: user added text to canvas , the canvas will be converted to DataURL, and then i want to add this base64 to another canvas but it is not working any idea on how can i fix this issue. ?

  const initCanvas = useCallback((ref: any, design: FabricCanvas) => {
        // @ts-ignore
        const canvas = new fabric.StaticCanvas(ref, {
            width: previewCanvasProperties.width,
            height: previewCanvasProperties.height,
            left: previewCanvasProperties.left,
            top: previewCanvasProperties.top,
        });
        var imageData = new Image();
        imageData.src = dataUrl;
        imageData.onload = function () {
            var imgInstance = new fabric.Image(imageData);
            canvas.add(imgInstance);
            canvas.renderAll();
        };
        // @ts-ignore
        canvas.renderAll();
        return canvas;
    }, []);
    return {
        initCanvas,
    };
};
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!