} $cond = router(2); // Pasta onde será enviada as fotos $pasta = "../uploads/static/"; $tipoCorte = $format; $qualidade = 100; if (!@$_FILES['filesData']) { echo '<script>swal("Erro!", "Você deve preencher ao menos uma foto.", "error");</script>'; exit; } foreach ($_FILES['filesData']['tmp_name'] as $key => $tmp_name) { $fileName = time() . $_FILES["filesData"]["name"][$key]; $fileTmp = $_FILES["filesData"]["tmp_name"][$key]; move_uploaded_file($fileTmp, $pasta . $fileName); // Verifica se a imagem é menor que o limite máximo, mantem a largura original. $realWidth = getImageDimens($pasta . $fileName, "largura"); if ($realWidth < $maxWidth) { $imageWidth = $realWidth; } else { $imageWidth = $maxWidth; } // Manipula a foto principal $img = new canvas(); $img->carrega($pasta . $fileName); $img->redimensiona($imageWidth, 0, $tipoCorte); $img->grava($pasta . $fileName, $qualidade); // Se solicitado, envia thumb manipulada if ($thumbs == "Sim") { $oThumb = new canvas(); $oThumb->carrega($pasta . $fileName); $oThumb->redimensiona($thumbW, $thumbH, $thumbCorte);
<meta property="og:image" content="<?php echo CP; ?> assets/img/logo.png"> <meta property="og:title" content="<?php echo getSys("siteTitle"); ?> "> <meta property="og:image:type" content="image/jpeg"> <meta property="og:image:width" content="<?php echo getImageDimens("assets/img/logo.png", "largura"); ?> "> <meta property="og:image:height" content="<?php echo getImageDimens("assets/img/logo.png", "altura"); ?> "> <meta property="article:published_time" content="<?php echo date("Y-m-d H:i"); ?> " /> <meta property="article:modified_time" content="<?php echo date("Y-m-d H:i"); ?> " /> <meta property="article:tag" content="<?php echo getSys("siteKeywords"); ?> " />