// start with 100 quality $quality = 70; // generate WEBP in the best possible quality // and file size less than the original do { // generate output WEBP file imagewebp($img, $webp_full_path, $quality); // decrease quality $quality -= 5; // no point in going below 70% quality if ($quality < 70) break; } while (filesize($webp_full_path) >= $original_file_size);
$_GET = [ 'city' => 'Cherry-Hill,NJ', 'page' => '2', ]; $_SESSION = [ '__flash' => [], 'area' => null, 'location' => 'Cherry Hill,NJ', ];