Image preview dynamically

Can we show image preview using image node dynamically by using an url with .webp extension?

Namaste @Srinivas
What do you mean by showing image dynamically? Do you want to display an image from another source which is dynamic in nature?

Yes displaying the image from url, it is resolved.

Great!
Can you post the steps here? It would help others looking for the same implementation.

There is an client api, which returns 5 image urls in the api response.
After parsing the api response we will store these 5 image urls (cdn/public links) and pass each url separately to the below code snippet. The function result has to be stored in var of type obj and in the next step use a image node and fetch the data from obj var to display the image from url.

return new Promise(resolve => {
      // Your logic goes here
      let productUrl = data.variables.productImage
      let product = "Sample"
      // console.log(url)
      resolve([
         {
            "url": productUrl,
            "options": {
               "caption": product
            }
         }
      ]);
  });                  

1 Like