Home > Net >  How do I display images to my App without storing the ACTUAL image in my front-end or Database?
How do I display images to my App without storing the ACTUAL image in my front-end or Database?

Time:11-20

I currently have images stored on my front-end. And then I store the imageUrl (directory that the image is in) in my backend to the specific object that needs it. However, In order to push out new images for the mobile app, I have to add them to my front-end and then create a new release in order to push the new app out to both app stores. Is this how it's supposed to be done? I feel like I'm doing it a very inefficient way. My front-end isn't on a server, but my backend is.

I am using a free MongoDB instance and so if I try to store a lot of images on there, it could take up quite a bit of bandwidth I think.

Thoughts or direction?

CodePudding user response:

Ideally, you can store the image files in Object storage like S3. And then just save the reference of the uploaded image in the database.

So now you can just get the reference to the image from the back-end using some API and then just use it in the front-end.

CodePudding user response:

you can use online storage options such as amazon s3, google storage etc.. push your images to one of the and use the public url of those uploaded images in your app. hope this answers your question.

  • Related