Display an Image from an API Response - Dropsource Help Center (2024)

If your API response includes the URLs for images you want to display in your app, you can do so using request Events. The process is slightly different from displaying other API data, as you need to specify that the app should load the images from the Web when the response data is received.

With the request added to a page in your app and an Image Element on the page:

  1. Open the request in the API tab on the right of the editor.
  2. Select the Events section. You should see an Event for each status code that the API returns.
  3. Open the Event for the status code your image URL is associated with (typically it will be 200: OK).
  4. Click the plus Display an Image from an API Response - Dropsource Help Center (1) button and select the Display Image from URL Action to add it. Click Edit.
    • In the first input, select the Image Element you added to the page. Display an Image from an API Response - Dropsource Help Center (2)
    • In the second input, select the URL from the API response in the Event Data container. Display an Image from an API Response - Dropsource Help Center (3)

    Save the Action.

When the app runs and the API response is received, the image will load into the Element from the URL. Remember to use a Run API Request Action to execute the request.

Was this article helpful to you? Yes No

Display an Image from an API Response - Dropsource Help Center (2024)
Top Articles
Latest Posts
Article information

Author: Errol Quitzon

Last Updated:

Views: 5809

Rating: 4.9 / 5 (79 voted)

Reviews: 94% of readers found this page helpful

Author information

Name: Errol Quitzon

Birthday: 1993-04-02

Address: 70604 Haley Lane, Port Weldonside, TN 99233-0942

Phone: +9665282866296

Job: Product Retail Agent

Hobby: Computer programming, Horseback riding, Hooping, Dance, Ice skating, Backpacking, Rafting

Introduction: My name is Errol Quitzon, I am a fair, cute, fancy, clean, attractive, sparkling, kind person who loves writing and wants to share my knowledge and understanding with you.