{"id":123195,"date":"2020-06-19T20:18:31","date_gmt":"2020-06-19T20:18:31","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/webp-wasm\/"},"modified":"2020-06-19T20:18:31","modified_gmt":"2020-06-19T20:18:31","slug":"webp-wasm","status":"publish","type":"plugin","link":"https:\/\/ne.wordpress.org\/plugins\/webp-wasm\/","author":18077378,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.0","stable_tag":"trunk","tested":"5.4.19","requires":"","requires_php":"","requires_plugins":"","header_name":"WebP WASM","header_author":"wrburnham","header_description":"Client side JPEG and PNG conversions to webp and upload.","assets_banners_color":"1b71ae","last_updated":"2020-06-19 20:18:31","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/github.com\/wrburnham\/wp-webp-wasm","header_author_uri":"https:\/\/wrburnham.github.io","rating":0,"author_block_rating":0,"active_installs":10,"downloads":1044,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","changelog"],"tags":[],"upgrade_notice":[],"ratings":[],"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":"2327719","resolution":"128x128","location":"assets","locale":""},"icon-256x256.png":{"filename":"icon-256x256.png","revision":"2327719","resolution":"256x256","location":"assets","locale":""}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":"2327719","resolution":"1544x500","location":"assets","locale":""},"banner-772x250.png":{"filename":"banner-772x250.png","revision":"2327719","resolution":"772x250","location":"assets","locale":""}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":[],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":"2327719","resolution":"1","location":"assets","locale":""},"screenshot-2.png":{"filename":"screenshot-2.png","revision":"2327719","resolution":"2","location":"assets","locale":""}},"screenshots":{"1":"Access the admin panel from the <strong>Tools<\/strong> menu.","2":"The admin panel for global (site-wide) conversion of images to WebP. A similar panel is available for individual media library images; to access this for an individual media resource, use the <strong>Edit<\/strong> link for the specific <strong>Media<\/strong> &gt; <strong>Library<\/strong> resource."},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[133,15376],"plugin_category":[50],"plugin_contributors":[187377],"plugin_business_model":[],"class_list":["post-123195","plugin","type-plugin","status-publish","hentry","plugin_tags-image","plugin_tags-webp","plugin_category-media","plugin_contributors-gecko43","plugin_committers-gecko43"],"banners":{"banner":"https:\/\/ps.w.org\/webp-wasm\/assets\/banner-772x250.png?rev=2327719","banner_2x":"https:\/\/ps.w.org\/webp-wasm\/assets\/banner-1544x500.png?rev=2327719","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/webp-wasm\/assets\/icon-128x128.png?rev=2327719","icon_2x":"https:\/\/ps.w.org\/webp-wasm\/assets\/icon-256x256.png?rev=2327719","generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/webp-wasm\/assets\/screenshot-1.png?rev=2327719","caption":"Access the admin panel from the <strong>Tools<\/strong> menu."},{"src":"https:\/\/ps.w.org\/webp-wasm\/assets\/screenshot-2.png?rev=2327719","caption":"The admin panel for global (site-wide) conversion of images to WebP. A similar panel is available for individual media library images; to access this for an individual media resource, use the <strong>Edit<\/strong> link for the specific <strong>Media<\/strong> &gt; <strong>Library<\/strong> resource."}],"raw_content":"<!--section=description-->\n<p>Convert jpeg and png images to their webp equivalents by leveraging google's libwebp and web assembly and serve webp images directly when supported in posts and pages.<\/p>\n\n<h3>Quick start<\/h3>\n\n<ul>\n<li>Sign into the backoffice as an admin user.<\/li>\n<li>Install the plugin and activate it.<\/li>\n<\/ul>\n\n<h3>Convert a single media library image<\/h3>\n\n<ul>\n<li>Navigate to <strong>Media &gt; Library<\/strong><\/li>\n<li>Select the <strong>list view<\/strong> icon<\/li>\n<li>Locate a jpeg or png image for editing and click the media's title link or the \"edit\" link under the entry.<\/li>\n<li>Scroll down to the bottom of the edit page to the (new) <em>WebP Conversion<\/em> section<\/li>\n<li>Click <strong>Create<\/strong> to create a webp version of this media library image on the server<\/li>\n<li>Click <strong>Delete<\/strong> to delete a webp version if it exists for this media library image<\/li>\n<\/ul>\n\n<h3>Convert all media library images<\/h3>\n\n<ul>\n<li>Navigate to <strong>Plugins<\/strong> <\/li>\n<li>Set the quality and overwrite flag as desired<\/li>\n<li>Click <strong>Create<\/strong> to create webp files for all media library images<\/li>\n<li>Click <strong>Delete<\/strong> to delete existing webp files for all media library images<\/li>\n<\/ul>\n\n<h3>How it works<\/h3>\n\n<p>The client (browser) creates a webp version of the image when the <strong>Create<\/strong> button is clicked. This is then sent to the server where it is saved in the same folder as the original image, but with a <code>.webp<\/code> extension.<\/p>\n\n<p>For example, if the original image is<\/p>\n\n<pre><code>\/wp-content\/uploads\/2020\/05\/test.jpg\n<\/code><\/pre>\n\n<p>an additional<\/p>\n\n<pre><code>\/wp-content\/uploads\/2020\/05\/test.webp\n<\/code><\/pre>\n\n<p>will be created there.<\/p>\n\n<p>A filter is applied in the WordPress hook <code>the_content<\/code> to swap an image for its webp equivalent if available.<\/p>\n\n<h3>More about the conversion<\/h3>\n\n<p>Conversion is done on the client, so a modern browser with wasm support is needed. This is because conversion to webp with php requires shell_exec to make calls to Google's cwebp or other php extensions are needed. These features often pose security risks that outweigh the benefits. This plugin gets around that by delegating the actual image conversion to the client. It's based on <a href=\"https:\/\/github.com\/wrburnham\/webp-wasm\">this encoder<\/a> to save webp versions of uploaded jpeg and png images.<\/p>\n\n<h3>License<\/h3>\n\n<p>This plugin is licensed as GPLv3.<\/p>\n\n<h3>Notes<\/h3>\n\n<p>The simple html dom parser library is used to render webp images directly in WordPress content where possible. The client-side conversion to WebP leverages Google's libwebp.<\/p>\n\n<!--section=changelog-->\n<p>First release<\/p>","raw_excerpt":"Convert jpeg and png media to webp and serve webp images when the browser supports it. This has been tested on WordPress 5.4.1 with php 7.2.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/ne.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/123195","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ne.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/ne.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/ne.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=123195"}],"author":[{"embeddable":true,"href":"https:\/\/ne.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/gecko43"}],"wp:attachment":[{"href":"https:\/\/ne.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=123195"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/ne.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=123195"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/ne.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=123195"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/ne.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=123195"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/ne.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=123195"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/ne.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=123195"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}