Get Image from URL in appwrite

    0

    5

    Khalid Khan

    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.

    Shortcut: appwrite.avatar.imageurl

    let result = sdk.avatars.getImage('imageurl');
    
    console.log(result); // Resource URL
    Codiga Logo
    Codiga Hub
    • Rulesets
    • Playground
    • Snippets
    • Cookbooks
    Legal
    • Security
    • Privacy Policy
    • Code Privacy
    • Terms of Service
    soc-2 icon

    We are SOC-2 Compliance Certified

    G2 high performer medal

    Codiga – All rights reserved 2022.