# Storing/serving images securely and efficiently

**URL:** <https://www.ruby-forum.com/t/storing-serving-images-securely-and-efficiently/225052>\
**Category:** NGINX\
**Created:** [December 9, 2012, 4:02pm UTC](https://www.ruby-forum.com/t/storing-serving-images-securely-and-efficiently/225052 "2012-12-09T16:02:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![aris](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/258eb7/32.png) [@aris](https://www.ruby-forum.com/u/aris)\
**Post date:** [December 9, 2012, 4:02pm UTC](https://www.ruby-forum.com/t/storing-serving-images-securely-and-efficiently/225052/1 "2012-12-09T16:02:45Z")

</div>

What is the best practice for storing and serving images securely  
without  
hurting performance?

Is it possible to store user images in a folder that’s not web  
accessible  
(possibly higher up and before /www?) and serve on demand after the user  
has  
logged in to the page? There is a username and password access  
mechanism  
already in place.

The users don’t want these images to be publicly accessible.

I am running nginx with php on Ubuntu. Database is mysql.

Thank you.

Posted at Nginx Forum:

> **[Storing/serving images securely and efficiently](https://forum.nginx.org/read.php?2,233756,233756#msg-233756)**
>
> What is the best practice for storing and serving images securely without hurting performance? Is it possible to store user images in a folder that's not web accessible (possibly higher up and before /www?) and serve on demand after the user has...
