简体   繁体   中英

Best practice with storing images on server

people! Please suggest me what is the best practice to store and retrieve images with my php application. My app uses different sizes of uploaded images (thumb, small, middle, big etc). My current script creates all of the sizes after success image upload and stores 5 different version of every image. As the result, I'm running out of hosting storage space very fast.

So I want to ask: maybe better way to store only one original file and generate smaller sizes on the fly with php when image retrieves (maybe using some sort of cache)? Or which is the best practice by your opinion?

您可以在服务器上存储 1 个最大尺寸版本的图像,然后使用 TimThumb 之类的东西在加载时调整大小。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM