well this question annoying me every time when i think myth in mind if i use a code that re-size images on fly like timb thumb it will take CPU resource and well as Ram at the end my shared hosting will enough for that OR even if i get dedicated server for this purpose will also fail i need your answer on your experience knowledge
There's no way to know the answer to your question without knowing more about your website. The load on the server depends on how many images need to be processed, the size of the images, and how much traffic your website receives. If you only get a few hundred visitors per hour and only two or three images on each page include thumbnails, then I wouldn't worry. If you get several thousand visitors per hour or your pages include many thumbnails, then you should probably look for other ways to create them.
Unless you're giving your users a choice of size for the images, store them in the size you want them to be displayed. That gives you two advantages: 1) No worry about the load from resizing. 2) Resizing an image degrades the quality.
This is a matter of logic... Does it make sense to perform the same operation OVER and OVER and OVER again to produce the SAME result each time? The answer is NO. If you need to resize an image on the fly then write your script in a way where it will dynamically resize the image on the first time it is requested THEN for each subsequent request use the saved image from the first request.