Attached simple code that I use. You have to develop code php to compress photos ($photo). For example, a photo that weighs 400KB have to reduce it to 40-80KB without losing quality, with the same size.
It is necessary that the image is compressed before save Image in the path.
I use a linux server centos7.
<?php
private function saveImage($image, $path, $name)
{
$file = fopen($path.'/'.$name, 'wb');
fwrite($file, $image);
fclose($file);
}
public function uploadPhoto($photo)
{
$this->saveImage(base64_decode($photo), 'images/tags', $name.$this->EXTENSION_JPG);
}
?>
Hi ,
I have created & customized more than 50 around PHP scripts for my client . I have good experience in nodejs , javascript & PHP scripts .
I have made PHP scripts as per client requirements. you can see client's feedbacks for script development tasks on my profile page :-
https://www.freelancer.com/projects/Graphic-Design/Modifications-Website-Builder-PHP-script/
https://www.freelancer.com/projects/php/Recieve-data-from-RestfulAPI-insert/
https://www.freelancer.com/projects/php/simple-PHP-script-for-image/
I hope you would choose me for this job, looking at my expertise, and my assurance to get the job within budget and on time.
Please ping me for more discussion about your task .
With Best Regards,
s
*******************************
Hi, I've seen your project's description and understand your requirements. I've 3 years of development experience and can do this job. I know different libraries which I can use to reduce the size of image and maintain it's quality. We can discuss more in details in chat.
Thanks!
Computer Science graduate and have experience in PHP Work on many projects of PHP.
So i will support you project as much you required.
please check my profile i have done many project on PHP AND java.
hope will see you.
thanks