Skip to main content

How can I retrieve an image from a table when using VueJS?

  • January 23, 2021
  • 2 replies
  • 46 views

I have created a Base and have set a column (videoImage) to use an Attachment. Next I have uploaded an image. In my VueJS app I have the following however the path of the image is incorrect and the image won’t render.

<img v-bind:src="record['fields']['videoImage']" class="img-responsive" alt="Video">

Therefore, is there a way to get the URL of any item such as documents, images etc that are uploaded as attachments or bind the correct path in Vue?

This topic has been closed for replies.

2 replies

Forum|alt.badge.img+19
  • Inspiring
  • January 23, 2021

This is an object, not a URL. A file attachment field object looks like this:

As such, you need to identify the URL field. e.g., …

record['fields']['videoImage'][0].url


  • Author
  • Participating Frequently
  • January 24, 2021

This is an object, not a URL. A file attachment field object looks like this:

As such, you need to identify the URL field. e.g., …

record['fields']['videoImage'][0].url


That’s amazing Bill. Thank you very much for your help, it’s very much appreciated.