$(document).ready(function() {
var hasWebP = false;
var img = new Image();
img.onload = function() {
hasWebP = !!(img.height > 0 && img.width > 0);
if(hasWebP){e = "enabled";}else{e = "not supported"}
$(".log").html(e);
};
img.onerror = function() {
hasWebP = false;
if(hasWebP){e = "enabled";}else{e = "not supported"}
$(".log").html(e);
};
img.src = 'https://www.gstatic.com/webp/gallery/1.webp';
});