Title: Simple Webp Images
Author: Mike Bricknell-Barlow
Published: <strong>January 18, 2020</strong>
Last modified: April 14, 2024

---

Search plugins

![](https://ps.w.org/simple-webp-images/assets/banner-772x250.jpg?rev=2229651)

This plugin **hasn’t been tested with the latest 3 major releases of WordPress**.
It may no longer be maintained or supported and may have compatibility issues when
used with more recent versions of WordPress.

![](https://ps.w.org/simple-webp-images/assets/icon-128x128.jpg?rev=2229651)

# Simple Webp Images

 By [Mike Bricknell-Barlow](https://profiles.wordpress.org/mikebricknellbarlow/)

[Download](https://downloads.wordpress.org/plugin/simple-webp-images.zip)

 * [Details](https://pcm.wordpress.org/plugins/simple-webp-images/#description)
 * [Reviews](https://pcm.wordpress.org/plugins/simple-webp-images/#reviews)
 *  [Installation](https://pcm.wordpress.org/plugins/simple-webp-images/#installation)
 * [Development](https://pcm.wordpress.org/plugins/simple-webp-images/#developers)

 [Support](https://wordpress.org/support/plugin/simple-webp-images/)

## Description

This plugin helps to increase site speed, and helps to improve scores in Google’s
Pagespeed Insights tool by addressing the common recommendation “Serve next-gen 
image formats”.

For the best speeds, Google recommends using new image formats such as .webp, which
offer smaller file sizes than common formats such as .jpg or .png with no visible
loss in quality. However, not all internet browsers support the .wepb image format,
so only using that format would result in broken images in older browsers.

This plugin addresses that problem, and allows your site to use .webp images when
it can. This plugin will convert images from .jpg or .png automatically, and save.
webp versions of the image alongside the original. When a user visits the site in
a compatible browser, they will be shown the .webp versions of all images, making
your site load faster and improving your scores in Google Pagespeed Insights. Users
on older browsers that aren’t compatible with .webp images will be shown the .jpg
or .png versions of the images instead.

When first installing the plugin, run the Bulk Converter to convert all your existing
images. See the Installation section for instructions.

After installation, any .jpg or .png image uploaded to the Media Library will be
automatically converted.

### Settings

 * Conversion quality – Controls the level of compression on the generated .webp
   images. The lower the value, the smaller the file size of the generated images,
   but the more chance there is of a visual degradation of quality. The quality 
   value to be entered is a percentage – by default, this is set at 80%. Most users
   won’t need to change this.
 * HTML Output Buffering – This allows the plugin to perform a find-and-replace 
   on the HTML that WordPress has generated for output to the browser to replace
   image tags. This tends to perform the image tag replacement more reliably, but
   can cause issues with some themes. Users are advised to have this setting turned
   on, but they should check that the site is displaying as it should, and turn 
   this option off if any issues arise.
 * Exclude pages from HTML output buffering – To specify pages that should be excluded
   from the HTML Output Buffering settings
 * Lazy loading – This improves the site speed further by not loading images that
   are further down the page until the user has scrolled down to them. This saves
   time downloading images that the user hasn’t got to yet, or might not get to 
   at all. Users are advised to have this setting turned on, but they should check
   that the site is displaying as it should, and turn this option off if any issues
   arise.
 * Exclude image classes from lazy-loading – To specify images, by class name, that
   should not have the lazy-loading applied

### Developers

If using Simple Webp Images with your custom themes or plugins, there’s a couple
of filters you can use, as below.

 * `simple-webp-images-exclude-from-output-buffering` filter

Use this to exclude pages or posts from the HTML output buffering via `apply_filters`,
using any critera you need. Call the filter, run any checks you need, and return‘
true’ to exclude the current page or post from the buffering.
 Example:

    ```
    apply_filters( 'simple-webp-images-exclude-from-output-buffering', 'exclude_page_with_id_100_from_output_buffering' );
    function exclude_page_with_id_100_from_output_buffering( $is_excluded ) {
        if( get_the_id() == 100 ) {
            return true;
        }

        return false;
    }
    ```

The example code could be placed in your `functions.php` file.

 * `simple-webp-images-exclude-from-lazy-loading` filter

Use this to exclude pages or posts from the image lazy loading via `apply_filters`,
using any critera you need. Call the filter, run any checks you need, and return‘
true’ to exclude the current page or post from the lazy loading.
 Example:

    ```
    apply_filters( 'simple-webp-images-exclude-from-lazy-loading', 'exclude_page_with_id_100_from_lazy_loading' );
    function exclude_page_with_id_100_from_lazy_loading( $is_excluded ) {
        if( get_the_id() == 100 ) {
            return true;
        }

        return false;
    }
    ```

The example code could be placed in your `functions.php` file.

## Installation

This section describes how to install the plugin and get it working.

e.g.

 1. Install the plugin through the WordPress plugins screen directly, or download the.
    zip file, and upload it by going to Plugins -> Add New -> Upload .zip file.
 2. Activate the plugin through the ‘Plugins’ screen in WordPress
 3. Use the Bulk Converter to convert all existing images to .webp. Go to Settings -
    > Simple Webp Images, and click the Start Bulk Conversion button at the bottom.
    The plugin will count all the images, and start processing them 10 at a time. Leave
    the page open until the conversion is completed.
 4. Configure other plugin settings on the plugin settings page, at Settings -> Simple
    Webp Images. See below for a description of the available settings.

## FAQ

### My site doesn’t display correctly with HTML Output Buffering turned on – what should I do?

If certain pages don’t display correctly, but the rest of the site does, exclude
the problem pages from the output buffering on the plugin settings page, under Settings-
> Simple Webp Images.
 If it’s the majority of the site that doesn’t display correctly,
turn off the setting and send me a message describing the issue that you saw – I’ll
try to issue a fix and come back to you!

## Reviews

![](https://secure.gravatar.com/avatar/be82460653faa902750256fd64e6be92a78caea582880c9d26d15dfe7b425309?
s=60&d=retro&r=g)

### 󠀁[Works Perfectly!](https://wordpress.org/support/topic/works-perfectly-2183/)󠁿

 [Enterprise Branding](https://profiles.wordpress.org/enterprisebranding/) January
15, 2021 1 reply

Hi! I just wanted to leave a review because I saw the lack of reviews and the other
non-descriptive review, and because I have been using this plugin for maybe about
a year now and have no issues– working out of the box on Litespeed servers.

![](https://secure.gravatar.com/avatar/4f7e4298fc555150333f6fab312bbffb52a2cd6e799239943451ab3192e96ecc?
s=60&d=retro&r=g)

### 󠀁[don’t work](https://wordpress.org/support/topic/dont-work-326/)󠁿

 [websty](https://profiles.wordpress.org/promocot/) September 13, 2020

don’t work, i have png images, after converting nothing changes

![](https://secure.gravatar.com/avatar/3b10cec640bd35c95cceecef10daa29ba67cdc9cb953d8a83cfecf4f199ec3d3?
s=60&d=retro&r=g)

### 󠀁[Worked well on both servers!](https://wordpress.org/support/topic/worked-well-on-both-servers/)󠁿

 [jamesfawcett](https://profiles.wordpress.org/jamesfawcett/) January 20, 2020

Installed on two sites so far, very impressed! Lightweight, easy to set up and also
compatible with WPEngine. Nice clean UI for bulk converting existing images too!

 [ Read all 4 reviews ](https://wordpress.org/support/plugin/simple-webp-images/reviews/)

## Contributors & Developers

“Simple Webp Images” is open source software. The following people have contributed
to this plugin.

Contributors

 *   [ Mike Bricknell-Barlow ](https://profiles.wordpress.org/mikebricknellbarlow/)

“Simple Webp Images” has been translated into 2 locales. Thank you to [the translators](https://translate.wordpress.org/projects/wp-plugins/simple-webp-images/contributors)
for their contributions.

[Translate “Simple Webp Images” into your language.](https://translate.wordpress.org/projects/wp-plugins/simple-webp-images)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/simple-webp-images/),
check out the [SVN repository](https://plugins.svn.wordpress.org/simple-webp-images/),
or subscribe to the [development log](https://plugins.trac.wordpress.org/log/simple-webp-images/)
by [RSS](https://plugins.trac.wordpress.org/log/simple-webp-images/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 2.0.0

 * Rewriting to make use of new language features
 * More efficient HTML replacement
 * PHP 8 required

#### 1.3.0

 * Feature – Rewriting element generation to improve efficiency, moving all sized
   images to separate elements

#### 1.2.1

 * Bugfix – Allowing webp images to be generated when small enough that no sized
   versions are generated

#### 1.2.0

 * Feature – Allowing exclusion from HTML output buffering and image lazy loading
   via apply_filters

#### 1.1.18

 * Bugfix – Getting attachment ID from image URL if no other attachment ID is found

#### 1.1.17

 * Bugfix – Preventing HTML output buffering from affecting XML sitemaps, such as
   those produced by Yoast SEO

#### 1.1.16

 * Bugfix – Preventing select box styling on admin page affecting entire WordPress
   dashboard

#### 1.1.15

 * Feature – Allowing lazy-loading to be disabled for specified image classes
 * Feature – Allowing HTML Output Buffering to be disabled for specified pages

#### 1.1.14

 * Bugfix – Preventing HTML entities from breaking in buffered content
 * Updating supported version

#### 1.1.13

 * Bugfix – Preventing conflict with Gutenberg, caused by plugin attempting to process
   json posted by Gutenberg using HTML buffering

#### 1.1.12

 * Bugfix – Updating to use directory separator constant to fix issues on Windows
   based systems

#### 1.1.11

 * Bugfix – Adding information message to admin page to explain process of temporarily
   setting Wordfence Firewall to Learning Mode, to avoid issue with blocking of 
   conversion ajax calls.

#### 1.1.10

 * Bugfix – adding check to verify if output buffered string is HTML before attempting
   to process

#### 1.1.9

 * Adding settings link to plugins page for ease of use

#### 1.1.8

 * Preventing HTML output buffering from affecting wp ajax requests, as this breaks
   some functionality

#### 1.1.7

 * Sanitizing input/output

#### 1.1.6

 * Bugfix, error with public assets version

#### 1.1.5

 * General bugfixes/stability improvements

#### 1.1.0

 * Adding option for lazy load functionality

#### 1.0.5

 * Adding option for frontend img replacement via HTML output buffering
 * General bugfixes

#### 1.0.0

 * Initial plugin version
 * Bulk conversion of images from settings screen
 * Frontend img replacement via the_content filter

## Meta

 *  Version **2.0.0**
 *  Last updated **2 years ago**
 *  Active installations **20+**
 *  WordPress version ** 5.0.0 or higher **
 *  Tested up to **6.5.8**
 *  PHP version ** 8.0 or higher **
 *  Languages
 * [English (US)](https://wordpress.org/plugins/simple-webp-images/), [Spanish (Chile)](https://cl.wordpress.org/plugins/simple-webp-images/),
   and [Spanish (Spain)](https://es.wordpress.org/plugins/simple-webp-images/).
 *  [Translate into your language](https://translate.wordpress.org/projects/wp-plugins/simple-webp-images)
 * Tags
 * [conversion](https://pcm.wordpress.org/plugins/tags/conversion/)[images](https://pcm.wordpress.org/plugins/tags/images/)
   [pagespeed](https://pcm.wordpress.org/plugins/tags/pagespeed/)[speed](https://pcm.wordpress.org/plugins/tags/speed/)
   [webp](https://pcm.wordpress.org/plugins/tags/webp/)
 *  [Advanced View](https://pcm.wordpress.org/plugins/simple-webp-images/advanced/)

## Ratings

 3.7 out of 5 stars.

 *  [  2 5-star reviews     ](https://wordpress.org/support/plugin/simple-webp-images/reviews/?filter=5)
 *  [  0 4-star reviews     ](https://wordpress.org/support/plugin/simple-webp-images/reviews/?filter=4)
 *  [  0 3-star reviews     ](https://wordpress.org/support/plugin/simple-webp-images/reviews/?filter=3)
 *  [  0 2-star reviews     ](https://wordpress.org/support/plugin/simple-webp-images/reviews/?filter=2)
 *  [  1 1-star review     ](https://wordpress.org/support/plugin/simple-webp-images/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/simple-webp-images/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/simple-webp-images/reviews/)

## Contributors

 *   [ Mike Bricknell-Barlow ](https://profiles.wordpress.org/mikebricknellbarlow/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/simple-webp-images/)

## Donate

Would you like to support the advancement of this plugin?

 [ Donate to this plugin ](https://paypal.me/mikebarlow1989)