Title: WebP Problems
Last modified: August 30, 2016

---

# WebP Problems

 *  Resolved [Diosa-UK](https://wordpress.org/support/users/venus-hair-brighton/)
 * (@venus-hair-brighton)
 * [11 years ago](https://wordpress.org/support/topic/webp-problems/)
 * Hi there,
 * We are running your Cloud version of the plugin and the image optimizations have
   been fantastic. But we can’t get webp images to be served.
 * 1. We’ve used your default htaccess code, entering it manually both at the very
   top or just under the #Begin WordPress rewrites.
 * 2. The Admin does not show the green webp (stuck on red png).
 * 3. We’ve confirmed with our VPS hosts that mod_rewrite and mod_Headers are switched
   on.
 * But can I check one thing about how the plugin renames the WebP image files please?
   After Bulk Optimize we have our images named as follows…
 * image1.jpg
    image1.jpg.webp etc etc
 * Is this correct? Is the htaccess rewrite not looking for an identically named.
   webp file, but for a .webp file with .jpg appended to the original filename? (
   that make sense?!)
 * ie. the rewrite code provided – is it looking for image1.jpg.webp or image1.webp?
 * Would love to get the WebP functionality running, but have to say extrememly 
   pleased with the savings made already – thank you 🙂
 * [https://wordpress.org/plugins/ewww-image-optimizer-cloud/](https://wordpress.org/plugins/ewww-image-optimizer-cloud/)

Viewing 15 replies - 1 through 15 (of 31 total)

1 [2](https://wordpress.org/support/topic/webp-problems/page/2/?output_format=md)
[3](https://wordpress.org/support/topic/webp-problems/page/3/?output_format=md) 
[→](https://wordpress.org/support/topic/webp-problems/page/2/?output_format=md)

 *  Plugin Author [Shane Bishop](https://wordpress.org/support/users/nosilver4u/)
 * (@nosilver4u)
 * [11 years ago](https://wordpress.org/support/topic/webp-problems/#post-6208766)
 * The filenaming is correct. EWWW used to just change the extension, but that had
   some naming conflict potential, so we changed to appending the .webp extension.
 * At any rate, what browser are you testing this with?
 *  Thread Starter [Diosa-UK](https://wordpress.org/support/users/venus-hair-brighton/)
 * (@venus-hair-brighton)
 * [11 years ago](https://wordpress.org/support/topic/webp-problems/#post-6208779)
 * Thanks for the incredibly quick response! 🙂
 * Testing in Chrome – checked via Developer Resources and it’s showing MIMEtype
   as jpeg’s – example page [http://goo.gl/FBJh6Q](http://goo.gl/FBJh6Q) (all those
   jpg’s have a .jpg.webp alternative).
 * Start of htaccess looks like this…
 *     ```
       # BEGIN WordPress
       <IfModule mod_rewrite.c>
       RewriteEngine On
       RewriteBase /
       RewriteRule ^index\.php$ - [L]
       RewriteCond %{REQUEST_FILENAME} !-f
       RewriteCond %{REQUEST_FILENAME} !-d
       RewriteRule . /index.php [L]
       </IfModule>
       # END WordPress
   
       # EWWW WebP Rewrite Rules
   
       <IfModule mod_rewrite.c>
   
       RewriteEngine On
   
       # check if browser accepts webp
       RewriteCond %{HTTP_ACCEPT} image/webp
   
       # check if file is jpg or png
       RewriteCond %{REQUEST_FILENAME} (.*)\.(jpe?g|png)$
   
       # check if corresponding webp file exists image.png -> image.webp
       RewriteCond %{REQUEST_FILENAME}\.webp -f
   
       # serve up webp instead
       RewriteRule (.+)\.(jpe?g|png)$ %{REQUEST_FILENAME}.webp [T=image/webp,E=accept:1]
   
       </IfModule>
       <IfModule mod_headers.c>
       Header append Vary Accept env=REDIRECT_accept
       </IfModule>
   
       AddType image/webp .webp
   
       # END WebP Rewrite Rules
       ```
   
 * The only other Server issue I’m thinking might be causing this is our VPS has
   NGINX running in front of Apache – though htaccess should still work normally(
   I’m told).
 * As I said would be nice for this to all work, but there’s so many possible variables
   with our server/htaccess etc., that if it doesn’t, it’s not a massive loss and‘
   so be it’! 🙂
 * ps. another thing I thought might affect this is that our WordPress is in a /
   sub-folder/ but runs as if from root – would this change the htaccess settings
   I need?
 *  Plugin Author [Shane Bishop](https://wordpress.org/support/users/nosilver4u/)
 * (@nosilver4u)
 * [11 years ago](https://wordpress.org/support/topic/webp-problems/#post-6208784)
 * It’s hard to say what will happen if you have nginx in front of your server, 
   but unless nginx is passing the Accept header to apache, you may need to use 
   the Alt WebP Rewriting.
 *  Thread Starter [Diosa-UK](https://wordpress.org/support/users/venus-hair-brighton/)
 * (@venus-hair-brighton)
 * [11 years ago](https://wordpress.org/support/topic/webp-problems/#post-6208798)
 * Thank you – I might try that approach then instead.
 * Could you point me in the right direction for where I can find the “Alt WebP”
   rewriting?
 * Cheers.
 *  Plugin Author [Shane Bishop](https://wordpress.org/support/users/nosilver4u/)
 * (@nosilver4u)
 * [11 years ago](https://wordpress.org/support/topic/webp-problems/#post-6208826)
 * It’s on the Conversion tab, right next to the WebP conversion option. Make sure
   you take the EWWW IO .htaccess rules out (although it doesn’t seem they are doing
   anything anyway).
 *  Thread Starter [Diosa-UK](https://wordpress.org/support/users/venus-hair-brighton/)
 * (@venus-hair-brighton)
 * [11 years ago](https://wordpress.org/support/topic/webp-problems/#post-6208829)
 * Missed that! Would have been real embarrassing had it worked lol
 * Unfortunately switching the Alternative WebP Rewriting, removing the htaccess
   stuff and clearing my APC cache, just gives me a white screen on the website.
   Server error logs say…
 * `[Mon Jun 08 16:12:33 2015] [error] [client 81.141.25.5] PHP Warning: DOMDocument::
   saveHTML() expects exactly 0 parameters, 1 given in /var/www/vhosts/venushairdesign.
   co.uk/httpdocs/brighton_/wp-content/plugins/ewww-image-optimizer-cloud/common.
   php on line 295, referer: http://www.venushairdesign.co.uk/`
 * …so it’s switched back off again 🙂
 *  Plugin Author [Shane Bishop](https://wordpress.org/support/users/nosilver4u/)
 * (@nosilver4u)
 * [11 years ago](https://wordpress.org/support/topic/webp-problems/#post-6208836)
 * The (optional) parameter for saveHTML() was added in PHP 5.3.6. I would strongly
   recommend seeing if you can get your PHP version upgraded, check with your webhost
   on how to do that.
 *  Plugin Author [Shane Bishop](https://wordpress.org/support/users/nosilver4u/)
 * (@nosilver4u)
 * [11 years ago](https://wordpress.org/support/topic/webp-problems/#post-6208844)
 * I went back and looked at why I had the parameter there, and it seems it was 
   an attempt to fix some encoding issues (pretty sure it did not work). I’ll remove
   it for the next release and see if that helps.
 *  Thread Starter [Diosa-UK](https://wordpress.org/support/users/venus-hair-brighton/)
 * (@venus-hair-brighton)
 * [11 years ago](https://wordpress.org/support/topic/webp-problems/#post-6208845)
 * Thanks for all your help…
 * Our VPS server is getting its hosting panel upgraded tomorrow to include PHP 
   5.4, so once that’s done I’ll also move EWWW Cloud from v2.4.2 to v2.4.3 (which
   is just showing as now available), and try again with the Alt WebP.
 * Cheers 🙂
 *  Thread Starter [Diosa-UK](https://wordpress.org/support/users/venus-hair-brighton/)
 * (@venus-hair-brighton)
 * [11 years ago](https://wordpress.org/support/topic/webp-problems/#post-6208905)
 * Todays Update:
    Server now running PHP 5.5.6 and I’ve updated EWWW to 2.4.3, 
   but when I enable Alt WebP it still doesn’t serve up any webp images 🙁
 * I also have a character problem scattered seemingly at random around the site
   which breaks some of the formatting (â³ instead of “, Â where a &nbsp should
   be etc).
 * Giving up on WebP for now – still extremely happy with the plugin though (review
   left) 🙂
 *  Plugin Author [Shane Bishop](https://wordpress.org/support/users/nosilver4u/)
 * (@nosilver4u)
 * [11 years ago](https://wordpress.org/support/topic/webp-problems/#post-6208920)
 * I’ve got a potential fix in ‘dev’ for the webp problem. Can you give it a try?
 * Download it from here:
    [https://downloads.wordpress.org/plugin/ewww-image-optimizer-cloud.zip](https://downloads.wordpress.org/plugin/ewww-image-optimizer-cloud.zip)
 * There’s only one or two changes, so it won’t break anything. At the very least,
   you’ll just have to disable the Alt WebP again. Make sure you’re using chrome,
   and that the images you’re checking actually have webp alternatives on your server.
 *  Thread Starter [Diosa-UK](https://wordpress.org/support/users/venus-hair-brighton/)
 * (@venus-hair-brighton)
 * [11 years ago](https://wordpress.org/support/topic/webp-problems/#post-6208921)
 * Installed v2.4.3.1… cache’s cleared etc, but still have the character issue and
   still no webp’s being served – sorry! (double-checked all have webp alternatives–
   thanks to the plugin virtually everything does).
 *  Plugin Author [Shane Bishop](https://wordpress.org/support/users/nosilver4u/)
 * (@nosilver4u)
 * [11 years ago](https://wordpress.org/support/topic/webp-problems/#post-6208922)
 * Ok, good to know, now there are two other things we can try that I already have
   in the common.php file.
 * 1. On line 184, it will look something like this:
 * `// $buffer = mb_convert_encoding( $buffer....`
 * Remove the two slashes at the front, and see if that fixes the character issue.
 * 2. If that doesn’t do it, put the slashes back, and there is another function
   two lines above that like this:
 * `// $buffer = utf8_decode...`
 * Same with that, remove the two slashes, and try that out.
 *  Thread Starter [Diosa-UK](https://wordpress.org/support/users/venus-hair-brighton/)
 * (@venus-hair-brighton)
 * [11 years ago](https://wordpress.org/support/topic/webp-problems/#post-6208923)
 * Removing // on line 184 – $buffer = mb_convert_encoding( $buffer, ‘HTML-ENTITIES’,‘
   UTF-8’ ); – worked with the character issues. Still have a few broken line-breaks
   in our theme (X Theme), but nothing too major to fix easily.
 * WebP still the same 🙂
 *  Plugin Author [Shane Bishop](https://wordpress.org/support/users/nosilver4u/)
 * (@nosilver4u)
 * [11 years ago](https://wordpress.org/support/topic/webp-problems/#post-6208924)
 * Hmm, there’s a /brighton_/ in the image urls, seems like WP is installed in a
   sub-directory, but running at the site root. Does that sound correct?
 * Or perhaps you just moved the wp-content folder?

Viewing 15 replies - 1 through 15 (of 31 total)

1 [2](https://wordpress.org/support/topic/webp-problems/page/2/?output_format=md)
[3](https://wordpress.org/support/topic/webp-problems/page/3/?output_format=md) 
[→](https://wordpress.org/support/topic/webp-problems/page/2/?output_format=md)

The topic ‘WebP Problems’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/ewww-image-optimizer-cloud_b5c8d7.
   svg)
 * [EWWW Image Optimizer Cloud](https://wordpress.org/plugins/ewww-image-optimizer-cloud/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ewww-image-optimizer-cloud/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ewww-image-optimizer-cloud/)
 * [Active Topics](https://wordpress.org/support/plugin/ewww-image-optimizer-cloud/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ewww-image-optimizer-cloud/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ewww-image-optimizer-cloud/reviews/)

## Tags

 * [EWWW](https://wordpress.org/support/topic-tag/ewww/)
 * [webp](https://wordpress.org/support/topic-tag/webp/)

 * 31 replies
 * 2 participants
 * Last reply from: [Diosa-UK](https://wordpress.org/support/users/venus-hair-brighton/)
 * Last activity: [10 years, 12 months ago](https://wordpress.org/support/topic/webp-problems/page/3/#post-6208986)
 * Status: resolved