Appwrite companion cookbook
Use this endpoint to fetch a remote image URL and crop it to any image size you want using appwrite avatar. This endpoint is very useful if you need to crop and display remote images in your app or in case you want to make sure a 3rd party image is properly served using a TLS protocol.
When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 400x400px.
let result = sdk.avatars.getImage('imageurl'); console.log(result); // Resource URL