fbpx

New Feature: Earn 12 Badges

Bild

Collect up to 12 exclusive badges by sharing your plugin collections and engaging with the community.

See all Badges
Images to WebP
Images to WebP

by KubiQ

Description

Statistics say that WebP format can save over a half of the page weight without losing images quality.
Convert PNG, JPG and GIF images to WebP and speed up your web, save visitors download data, make your Google ranking better.

  • automated test after plugin activation to make sure it will work on your server
  • works with all types of WordPress installations: domain, subdomain, subdirectory, multisite/network
  • works on Apache and NGiNX
  • image URL will be not changed so it works everywhere, in src, srcset, , even in CSS backgrounds and there is no problem with cache
  • original files will be not touched
  • set quality of converted images
  • auto convert on upload
  • only convert image if WebP filesize is lower than original image filesize
  • bulk convert existing images to WebP ( you can choose folders )
  • bulk convert only missing images
  • works with `Fly Dynamic Image Resizer` plugin

Hooks for developers

itw_extensions

Maybe you want to support also less famous JPEG extension like jpe, jfif or jif

add_filter( 'itw_extensions', 'extra_itw_extensions', 10, 1 );
function extra_itw_extensions( $extensions ){
    $extensions[] = 'jpe';
    $extensions[] = 'jfif';
    $extensions[] = 'jif';
    return $extensions;
}

itw_sizes

Maybe you want to disable WebP for thumbnails

add_filter( 'itw_sizes', 'disable_itw_sizes', 10, 2 );
function disable_itw_sizes( $sizes, $attachmentId ){
    unset( $sizes['thumbnail'] );
    return $sizes;
}

itw_htaccess

Maybe you want to modify htaccess rules somehow

add_filter( 'itw_htaccess', 'modify_itw_htaccess', 10, 2 );
function modify_itw_htaccess( $rewrite_rules ){
    // do some magic here
    return $rewrite_rules;
}

itw_abspath

Maybe you use roots.io/bedrock or other custom folder structure

add_filter( 'itw_abspath', 'modify_itw_abspath', 10, 2 );
function modify_itw_abspath( $abspath ){
    return trailingslashit( WP_CONTENT_DIR );
}

$images_to_webp->convert_image()

Maybe you want to automatically generate WebP for other plugins

add_action( 'XXPLUGIN_image_created', 'XX_images_to_webp', 10, 2 );
function XX_images_to_webp( $image_path ){
    global $images_to_webp;
    $images_to_webp->convert_image( $image_path );
}

All texts and images on this product page are protected by copyright and are the property of the author KubiQ. You will be redirected to the retailer to download the plugin. We act solely as a search engine for plugins and are not affiliated with the retailer or KubiQ.

Tags

Free Plugin

4.5
30 Reviews
Last Update
8 months ago
Installations
10,000
All trademarks, logos and brand names are the property of their respective owners. All company, product and service names used in this website are for identification purposes only. The WordPress® trademark is the intellectual property of the WordPress Foundation

Get your first Badge

Code Newbie

Earn your first badge by sharing your collections. Every master was once a beginner. Welcome to your coding journey.

0 of 5 views reached

Collections

Create your first Collection

Click the symbol on the desired plugin to create a collection. The symbol appears when you hover over the plugin.