i have a image post system on my website. My images size is too big. I heard, WebP image format can help with size problem. And i am wanting to change my image system to WebP image system. How can i do that? My code is below down.
`.
$file = $_FILES['file'];
$fileName = $_FILES['file']['name'];
$fileTmpName = $_FILES['file']['tmp_name'];
$fileSize = $_FILES['file']['size'];
$fileError = $_FILES['file']['error'];
$fileType = $_FILES['file']['type'];
$fileExt = explode('.', $fileName);
$fileName = $fileExt[0];
$fileActualExt = strtolower(end($fileExt));
$allowed = array('jpg', 'jpeg', 'png');
if(in_array($fileActualExt, $allowed)){
$fileNewName = $fileName."-".rand(100000,999999).'.'.$fileActualExt;
$fileDestination = '../images/postpp/'.$fileNewName;
move_uploaded_file($fileTmpName, $fileDestination);
}`
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…