I am uploading an image to my folder and I have created a thumbnail from uploaded image.
/*
save this image to try --
http://images.dpchallenge.com/images_challenge/0-999/319/800/Copyrighted_Image_Reuse_Prohibited_157378.jpg
*/
$source = 'H:/xampp/htdocs/myfolder/new.jpg';
$destination = $_SERVER['DOCUMENT_ROOT'] . 'myfolder/New/';
$quality = 60;
$info = getimagesize($source);
if ($info['mime'] == 'image/jpeg') {
$image = imagecreatefromjpeg($source);
}
echo $image;
print(imagejpeg($image, $destination, $quality));
imagejpeg($image, $destination, $quality);
But, it is not creating anything at all, I alreday have uploaded image in
Source=> /myfolder/
Now, how to create a thumbnail of smaller size and save it to
destination=> myfolder/New/
or May be my approach is wrong, If so please tell what is the right way.
Any help is really appreciated.