Online Promoters™ :: Web Development made simple

Why using cURL to retrieve images from url ?

Issue: Download an image from an url.
Some ways of doing it: using GD or cUrl
Test results:

The original picture size is 20.04 KB (20526 bytes)
Using GD (ImageCreate...) we are actually making a new file from the original one so:
- at 100% quality the file size is: 59.78 KB (61217 bytes) <--- this is 3 times bigger than the original file;
- at 80% quality we get almost the original size: 21.22 KB (21726 bytes) ;
Using GD we have to cut the picture quality by 20% from the beginning which doesn't make me happy.
Using cURL to retreive the image, we have the same size as the original file because we just download it.

The best way until today® is to use cURL.

Like always if i missed something just drop me some lines below