if (move_uploaded_file($tmp, $path . $photo_large)) { //=============== Image Large =================// $width = _Function::getWidth($path . $photo_large); $height = _Function::getHeight($path . $photo_large); $max_width = '1500'; if ($width < $height) { $max_width = '800'; } if ($width > $max_width) { $scale = $max_width / $width; $uploaded = _Function::resizeImage($path . $photo_large, $width, $height, $scale, $path . $photo_large); } else { $scale = 1; $uploaded = _Function::resizeImage($path . $photo_large, $width, $height, $scale, $path . $photo_large); } _Function::resizeImageFixed($path . $photo_large, 860, 260, $path . $photo_post); //<=// PHOTO LARGE =//> $photo_post_id = $photo_post; //==================================================// //= * COPY FOLDER COVER / * =// //==================================================// if (file_exists($path . $photo_post) && isset($photo_post_id)) { //<-------- * Cover 860x260 * -------> copy($path . $photo_post, $path_cover . $photo_post); unlink($path . $photo_post); /* Large Image */ copy($path . $photo_large, $path_cover . $photo_large); unlink($path . $photo_large); } //<--- IF FILE EXISTS #2 //<<<-- Delete old image -->>>/