I have a database, that stores items and a link to an image for every item. Now the images can't be storen localy (there wouldn't be anough space and other reasons as well), so I link to images on other servers.

When I wan't to display the items (with it's image), I run while statement with mysql_fetch_array like this (simplified):

The image on the other servers... are they your servers? If that's the case, you could create thumbnail versions of the images and source from those instead.
–
PureFormFeb 10 '11 at 16:28

No, they are not and they can change any time, so it's not possible to create thumnails before. =/
–
MikeFeb 10 '11 at 16:31

In that case, if you have rights to scrape the images, you can grab them from their servers, resize and put them on amazon S3. It should be fairly trivial with lines of php.
–
PureFormFeb 10 '11 at 16:38

this question has definitely nothing to do with PHP
–
Your Common SenseFeb 10 '11 at 17:00

Amazon S3 shouldn't be an option for a small project, right?
–
apxFeb 10 '11 at 17:00

The image is a certain (file) size, and it is stored somewhere that you don't control.

In order to reduce the size, you have to transfer the data to somewhere you do control — and that takes more or less the same time as it would take to transfer to the browser (after which you have to spent time editing the image, and then time transferring it to the browser).