Title: Using WebP
Last modified: April 10, 2021

---

# Using WebP

 *  Resolved [edjarrett](https://wordpress.org/support/users/edjarrett/)
 * (@edjarrett)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/using-webp-2/)
 * I have all of my images in WebP format. And they are served with non-AMP pages.
   But not with AMP. PageSpeed Insights tells me to use WebP images. And I have 
   tried with EWWW Image Optimizer and Imagify. But with no luck. Is there a trick
   to this?
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fusing-webp-2%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [Weston Ruter](https://wordpress.org/support/users/westonruter/)
 * (@westonruter)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/using-webp-2/#post-14300636)
 * On the non-AMP version I can see you’re serving WebP to supporting browsers via
   the `picture` element:
 *     ```
       <picture>
       	<source srcset="https://aclayjar.net/wp-content/uploads/suffering-for-Christ-500x430.jpg.webp 500w, https://aclayjar.net/wp-content/uploads/suffering-for-Christ-1024x881.jpg.webp 1024w, https://aclayjar.net/wp-content/uploads/suffering-for-Christ-768x661.jpg.webp 768w, https://aclayjar.net/wp-content/uploads/suffering-for-Christ-300x258.jpg.webp 300w, https://aclayjar.net/wp-content/uploads/suffering-for-Christ.jpg 1280w" sizes='(max-width: 500px) 100vw, 500px' type='image/webp'>
       	<img width="500" height="430" src="https://aclayjar.net/wp-content/uploads/suffering-for-Christ-500x430.jpg" class="attachment-medium size-medium" alt="suffering for Christ" loading="lazy" itemprop="image" srcset="https://aclayjar.net/wp-content/uploads/suffering-for-Christ-500x430.jpg 500w, https://aclayjar.net/wp-content/uploads/suffering-for-Christ-1024x881.jpg 1024w, https://aclayjar.net/wp-content/uploads/suffering-for-Christ-768x661.jpg 768w, https://aclayjar.net/wp-content/uploads/suffering-for-Christ-300x258.jpg 300w, https://aclayjar.net/wp-content/uploads/suffering-for-Christ.jpg 1280w" sizes="(max-width: 500px) 100vw, 500px" data-eio="p"/>
       </picture>
       ```
   
 * The use of `picture` isn’t yet support in AMP. The AMP plugin is stripping it
   out and then converting the contained `img` child element into `amp-img`. Supporting`
   picture` is something we’ve been looking into:
 * [https://github.com/ampproject/amphtml/issues/21912](https://github.com/ampproject/amphtml/issues/21912)
   
   [https://github.com/ampproject/amphtml/issues/30442#issuecomment-717009871](https://github.com/ampproject/amphtml/issues/30442#issuecomment-717009871)
   [https://github.com/ampproject/amphtml/issues/24233#issuecomment-589416933](https://github.com/ampproject/amphtml/issues/24233#issuecomment-589416933)
   [https://github.com/ampproject/amp-wp/issues/1316](https://github.com/ampproject/amp-wp/issues/1316)
 * For now, the best option is for you to dynamically serve WebP to browsers based
   on the `Accept` request header. If you’re using Apache, then you could do so 
   using a a rewrite rule like [https://github.com/vincentorback/WebP-images-with-htaccess](https://github.com/vincentorback/WebP-images-with-htaccess)
 * You can do something similar on Nginx.
 *  [Bethany Chobanian Lang](https://wordpress.org/support/users/mxbclang/)
 * (@mxbclang)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/using-webp-2/#post-14353137)
 * [@edjarrett](https://wordpress.org/support/users/edjarrett/) As we haven’t received
   a response, I’ll mark this as resolved. Feel free to open a [new support topic](https://wordpress.org/support/plugin/amp/#new-topic-0)
   if you continue to encounter issues, or reopen this topic and we’d be happy to
   assist. Thank you!
 *  Thread Starter [edjarrett](https://wordpress.org/support/users/edjarrett/)
 * (@edjarrett)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/using-webp-2/#post-14782281)
 * I solved it by using the WebP Express plugin.

Viewing 3 replies - 1 through 3 (of 3 total)

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

 * ![](https://ps.w.org/amp/assets/icon.svg?rev=2527602)
 * [AMP](https://wordpress.org/plugins/amp/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/amp/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/amp/)
 * [Active Topics](https://wordpress.org/support/plugin/amp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/amp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/amp/reviews/)

 * 3 replies
 * 3 participants
 * Last reply from: [edjarrett](https://wordpress.org/support/users/edjarrett/)
 * Last activity: [4 years, 9 months ago](https://wordpress.org/support/topic/using-webp-2/#post-14782281)
 * Status: resolved