我想以安全的方式存储用户上传的图像(.jpg)。我很困惑如何获得更好的结果和性能。我能看到的最佳选择是:
1. Store the images in database.
//problem : database size get large. lagging performance
2. Store them in a folder in encrypted manner.
//problem : Encryption and decryption on large file slows it down.
3. Place the image as it is in a folder behind 'public_html' in root directory.
//problem : I am unsure as they aren't encrypted.
哪种方法更好,或者我现在不知道还有其他“最佳实践”吗?