How to insert a image in a database?
Application Type
Traditional Web

Hey! So I am building an app to show some products and I wanted to show images of that products. I was watching a video and the youtuber created a new attributte and changed the data type to binary and then, createad a gallery view. I am building an tradicional web so I do not have the gallery view... How do I create a field "Image" and show it in a data table?

Thanks

To insert in the database you should create an attribute like this one below and assign the image content to it when you upload it, if that's the case. 

For best practices purposes, don't use the main entity (User, Invoice, etc etc) to save the image. Always use a side entity with the main entity foreign key. This will improve your performance when you only want to retrieve the main data.


To insert in the database you should create an attribute like this one below and assign the image content to it when you upload it, if that's the case. 

For best practices purposes, don't use the main entity (User, Invoice, etc etc) to save the image. Always use a side entity with the main entity foreign key. This will improve your performance when you only want to retrieve the main data.


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.