how to securely store an image