I’m writing a simple image upload function with php + image magick using amazon ec2 + s3.
The function basically receives the image, possibly compresses, and resizes it into 3~4 different sizes and the images get accessed more frequently than they are uploaded.
Not being an expert on digital images, I’m still deciding on whether to convert uploaded images into jpeg or keep their original format (jpeg, png, gif – gif will be converted into a still image in case the format gets converted).
There are two things to take into consideration that I can think of.
- computing power usage (better not to convert)
- network bandwidth (better to convert)
any recommendation?
From my experience, you want to keep the original image. You might need it later if you decide to redesign site and change image formats globally. If you don’t keep the original, you will not be able to re-process them in such situation.
Re. computing power usage — you should not worry about that. You resize only once, and then optimized image size compensate on CPU and bandwidth later every time images are loaded.