Fabric.js Tutorial – Part 3: Load Image

Fabric.js Tutorial – Part 3: Load Image


In this video, we’ll learn how to add an image to the canvas with Fabric.js First, prepare an image that you’d like to add call fabric.Image.fromURL() and pass a path to the image as a first parm For the second parm, pass a callback function. This function will be called when the image was loaded The loaded image will be passed to the function as an Image object So you can just add it to the canvas You can manipulate the image object like you did with other object types Since it’s an object, it has methods Let’s try changing width and height properties of this image programatically by using methods! Thanks for watching. Please subscribe if you like it 🙂

2 Replies to “Fabric.js Tutorial – Part 3: Load Image”

Leave a Reply

Your email address will not be published. Required fields are marked *