In a php project I have the problem, that my provider doesn’t allow me to set the memory-limit of my script higher. Therefore my script breaks if a user uploads a huge image file and I try to scale it down to safe it on the server.
My idea was to run an exec() command to use an external tool but did not find any examples. Is it possible to do so? Or should I try to scale the image down before upload, using javascript?
Or is there an other way to handle, I haven’t even thought about..?
Thanks for your help!
Use a client-side uploader with resizing/scaling capabilities. This will make sure that big images are scaled down before reaching your server. JumpLoader is a good one.