I think you are trying to save images in a database, and an ordinary user can see them. I think your problem is how to store images in a database, right? If I am right, you can store image names instead of imagse, as you would preserve age and name.
, , . , URL-/, .
, "image1.jpg", , , URL-, , , , URL-, .
image_jpg image_png, image_gif .. , . id, type name , URL- ,
.....................
id | type |name
0001 | jpg |image1
0002 | gif |image2
.....................
, /URL. URL-
0001 is "path/image_jpg/image1."+type
0002 is "path/image_gif/image2."+type
, , URL- ...
user3003149