Store images as links in db

First thanks for your time, i have writing an application to vuejs separate and Adonis back-end separately, but in my back-end i have successfully saved the image in my public folder, but i’m not sure if my vuejs app will be able to access the images in my back-end, is there a way to save the image as a link in db then on the front-end response i will use the link just as it is, here is my code below, thanks

Yes, you can access to images from public folder.

1 Like

If you are displaying an image without front-end record context - get the image URL.

If you are showing the image against a record: you would already have the image URL from the record - get that image URL. If not, you need to store the image reference somewhere.

The image URL data is passed to Vue in the regular query.

In Vue (sample):

 <img :src="record['imageURL'])">
1 Like