Webp width coming back as zero

Width (and i’m guessing height as well ) does not work on WEBP images. But they are supported, and show up in the panel. The mime type is listed in the source code.

<?php var_dump($page->file('myfile.webp')->width()) ?>

Is this a bug or maybe something missing that allows them to be read? The jpg version of the file, of course, works fine.

I switched the thumbs driver to IM and got the same result.

Seems the culprit is a missing mime type webp used to determine which files should work with dimensions.

Github Issue will be logged later.

I have created a PR.

1 Like