What are the best practices on image handling on a php driven web site when several versions of the same image are required (different sizes), bear in mind it’s a high load website:
- Upload and automatically create all sizes needed
- Upload a single size image then call a single script which based on a parameters resizes/crops and displays image directly to user
- Upload a single then also with script generate new and cache it for further use (this would require use of file_exists() to check if generated version exists)
- Call image directly then if it doesn’t exist redirect with htaccess to script which would generate it
If its a high traffic website, i would suggest you go with #1. Also keep in mind that if this is a high traffic website, you might need to move to a CDN soon, in that case it would be ideal to generate all thumbs and upload to your CDN and load in the page with a cookie-free domain.