i need to import images from a third party source. the import file looks like:
// import.csv
group1;nameofimage1;http://www.site.com/image/image1.jpg;nameofimage2;http://www.site.com/image/image2.jpg; etc...
you can have up to 20 images per line.
i have a cronjob that reads the file and then process it (loop each line, parse each line then curl to get the image etc.. - that im ok).
the image provided are way too big for what i need and for each file i need to resize them to 50% of their original size. i tried to use the gd library but it takes a very long time to complete.
is it normal? what can i use to make it faster?
thansk
GD
library is not optimized for big images.. actually I'd NOT recommend to use GD at all.. only if you don't have other options..
ImageMagick is your wizard here :)
And other small bit. Better is to not use PHP for this task. You can use command line imagemagick tools for this. Just add another line to your cron/bash script to automatically resize images if needed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With