I am making a web application that needs to show 3 types of thumbnails to a user. No I might end up with a lot of thumbnail files on the server for a lot of users.

This makes me think is generating thumbnails on the fly is a better option than storing them?

Speed vs Storage vs Logic - Which one to go for?

Does anyone here ever faced such a dilemma - let me know!

I am using CodeIgniter and its inbuilt Image Library for generating thumbnails.