[Resolved] Is it possible to upload .webp images?

Home Forums Support [Resolved] Is it possible to upload .webp images?

Home Forums Support Is it possible to upload .webp images?

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #824931
    Paolo

    Hi there,

    I don’t know if this makes sense, but i’m trying to upload .webp images on WP. Is this possible?

    Thanks!

    #825070
    David
    Staff
    Customer Support

    Hi there,

    you would need to use an image optimization plugin, most of which are premium such as EWWW or Short Pixel. There is also this plugin:

    https://wordpress.org/plugins/webp-express/

    #1558845
    Howard

    Hi
    I used this code in CODE SNIPPETS..PLUGIN, by one of your advisors, but it does not allow web p
    Is it possible this has something to do with my CDN,,,,keyCDN,,,changes have to be made???

    //** *Enable upload for webp image files.*/
    function webp_upload_mimes($existing_mimes) {
    $existing_mimes[‘webp’] = ‘image/webp’;
    return $existing_mimes;
    }
    add_filter(‘mime_types’, ‘webp_upload_mimes’);

    //** * 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;
    }

    Howard

    #1559199
    Leo
    Staff
    Customer Support

    Can you try the plugin David recommended?

    That should be the best solution.

    The theme itself cannot control what you can/can’t upload to the WordPress media library as that’s handled by WordPress itself.

    #1559389
    Howard

    Will give it a try
    Thanks
    ๐Ÿ‘

    #1559390
    Leo
    Staff
    Customer Support

    No problem ๐Ÿ™‚

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.