[Vuejs]-How to load image object downloaded from aws s3 using signedURL in vuejs?

0👍

You don’t need to use base64 encoded data to display image, it is slow. I would say, simply use signed url. I was doing the same as you are doing but later found that no need to download an image data instead simply use signed url as image source. Also generating signed url is synchrounous which makes it easy to handle code.

So instead of this

<div v-for="(data, key) in imgURL" :key="key">
  <img :src= "getLink(data)" />
</div>

Do this

<div v-for="(data, key) in imgURL" :key="key">
  <img :src="data" />  // I am not Vue guy, so use `data` value here
</div>

Leave a comment