[default template] Fixed WebP detection code