Mô tả
Statistics say that Web
Bạn đang xem: Edit fiddle
P format can save over a half of the page weight without losing images quality.Convert PNG, JPG & GIF images lớn WebP & speed up your web, save visitors download data, make your Google ranking better.automated thử nghiệm after plugin activation lớn make sure it will work on your serverworks with all types of Word
Press installations: domain, subdomain, subdirectory, multisite/networkworks on Apache & NGi
NXimage URL will be not changed so it works everywhere, in src, srcset,
, even in CSS backgrounds và there is no problem with cacheoriginal files will be not touchedset chất lượng of converted imagesauto convert on uploadonly convert image if Web
P filesize is lower than original image filesizebulk convert existing images to lớn Web
P ( you can choose folders )bulk convert only missing imagesworks with `Fly Dynamic Image Resizer` plugin
Hooks for developers
itw_extensionsMaybe you want to tư vấn also less famous JPEG extension lượt thích 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 Web
Xem thêm: Cách Tối Ưu Ssd Trong Windows 10, 11, Tối Ưu Hóa Ssd
P for thumbnailsadd_filter( "itw_sizes", "disable_itw_sizes", 10, 2 );function disable_itw_sizes( $sizes, $attachment
Id ) unset( $sizes<"thumbnail"> ); return $sizes;itw_htaccess
Maybe you want to lớn modify htaccess rules somehow
add_filter( "itw_htaccess", "modify_itw_htaccess", 10, 2 );function modify_itw_htaccess( $rewrite_rules ) // vì chưng some magic here return $rewrite_rules;itw_abspath
Maybe you use roots.io/bedrock or other custom thư mục 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 lớn automatically generate Web
P 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 );
Cài đặt
Upload images-to-webp directory khổng lồ the /wp-content/plugins/ directoryActivate the plugin through the ‘Plugins’ menu in Word
Press