Since we are already creating the webp files via a cronjob, we simply modified your “adaptive-images-script.php” and added to you function “adaptive_images_script_send_image” the following lines as a temporary solution:
if(strpos($_SERVER["HTTP_ACCEPT"], "image/webp") !== false){
$tmp = preg_replace("/\.(jpe?g|png)$/", ".webp", $filename);
if(file_exists($tmp)){
$filename = $tmp;
$extension = 'webp';
}
if(in_array($extension, array('png', 'gif', 'jpeg', 'webp'))){
...
}