-
AuthorPosts
-
September 18, 2019 at 3:15 pm #1139518
Hi, I have almost implemented the webp image format. I need to be able to preview the images or thumbails.

I found this function but I apply it and it doesn’t work
//enable preview / thumbnail for webp image files. function webp_is_displayable($result, $path) { if ($result === false) { $displayable_image_types = array( IMAGETYPE_WEBP ); $info = @getimagesize( $path ); if (empty($info)) { $result = false; } elseif (!in_array($info[2], $displayable_image_types)) { $result = false; } else { $result = true; } } return $result; } add_filter('file_is_displayable_image', 'webp_is_displayable', 10, 2);Thank you.
Greetings!
September 21, 2019 at 10:18 pm #1140508Hey Ganubis,
Sorry for the late reply, unfortunately, this function doesn’t work for me in showing a thumbnail and my research finds that even with the ability to upload the file type to the media library, which I could, WordPress can not create a thumbnail from the file.
I also tested this in the default WordPress theme but the thumbnail still would not show, interesting webp is not supported in Safari so it may be more trouble than it’s worth at this time. As this is a core WordPress limitation, I’m not sure how we can further help.Best regards,
MikeSeptember 23, 2019 at 1:23 am #1140795Hi Mike, Thank you very much for answering.
Yes, I was thinking the same. It seems early to start using directly only webp images.
Thanks, Mike!!
September 23, 2019 at 1:49 am #1140798Hi,
Thank you for bringing this up, I’m sure it won’t be too long before this becomes a new standard, but we will have to wait for iPhone to support it then WordPress will probably push it.
We will close this now. Thank you for using Enfold.For your information, you can take a look at Enfold documentation here
For any other questions or issues, feel free to start new threads in the Enfold forum and we will gladly try to help you :)Best regards,
Mike -
AuthorPosts
- The topic ‘Enable preview / thumbnail for webp image files’ is closed to new replies.
