fromUrl
API reference for the "fromUrl" method.
const { imageHelpers } = window.canva;
const canva = window.canva.init();
canva.onReady(async (opts) => {
// Download an image as a CanvaImageBlob
const image = await imageHelpers.fromUrl("URL_GOES_HERE");
// Do something with the result
console.log(image);
});
Name | Type | Required | Description |
---|---|---|---|
url | string | Yes | The URL of an image. This URL must be from a supported Canva domain, such as the domain where assets are hosted. |
Promise<CanvaImageBlob>
Last modified 1yr ago