ryanfern86goa Posted January 9, 2010 Share Posted January 9, 2010 Hi there i have jus written a php program to upload and display images but when i try to upload them it takes a long time to upload if the file is big. But the big problem is when i try to display them. The time taken to display them is huge. so i was just wondering if its posible to optimize a image quality to 50% or reduce size before uploading it to the server and also save some bandwidth. can i do this directly from the upload form for jpeg image $name=$_FILES['file']['name']; $tmpname=$_FILES['file']['tmp_name']; $path=images/$name; $tmp=imagecreatefromjpeg($tmpname); imagejpeg($tmp,$path,50); Any comments would be grately be appreciated. thanks Link to comment https://forums.phpfreaks.com/topic/187835-can-i-optmize-image-to-50-quality-before-uploading-2-server/ Share on other sites More sharing options...
Mchl Posted January 9, 2010 Share Posted January 9, 2010 If you want to do it BEFORE upload, you basically need to do this on your PC Link to comment https://forums.phpfreaks.com/topic/187835-can-i-optmize-image-to-50-quality-before-uploading-2-server/#findComment-991731 Share on other sites More sharing options...
ryanfern86goa Posted January 9, 2010 Author Share Posted January 9, 2010 hi thanks for your reply. so there isnt any other way that i can do it from the server side?. or is there any other way to speed the upload time . Also how to preload multiple images in php may be in combonation with javascript. thanks Link to comment https://forums.phpfreaks.com/topic/187835-can-i-optmize-image-to-50-quality-before-uploading-2-server/#findComment-991738 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.