# Use webp images for posts

**URL:** <https://forum.ghost.org/t/use-webp-images-for-posts/6710>\
**Category:** Ideas\
**Tags:** 🚢-shipped\
**Created:** [April 8, 2019, 9:09pm UTC](https://forum.ghost.org/t/use-webp-images-for-posts/6710 "2019-04-08T21:09:43Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![giacomosilli](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/giacomosilli/32/3403_2.png) [@giacomosilli](https://forum.ghost.org/u/giacomosilli)\
**Post date:** [April 8, 2019, 9:09pm UTC](https://forum.ghost.org/t/use-webp-images-for-posts/6710/1 "2019-04-08T21:09:43Z")

</div>

Are you working on the possibility of using the new .webp format on Ghost?  
It could be a useful future optimization

[More info](https://developers.google.com/speed/webp/)

---

<div class="post-metadata">

**Author:** ![leszek](https://avatars.discourse-cdn.com/v4/letter/l/82dd89/32.png) [@leszek](https://forum.ghost.org/u/leszek)\
**Post date:** [August 5, 2019, 8:44pm UTC](https://forum.ghost.org/t/use-webp-images-for-posts/6710/2 "2019-08-05T20:44:01Z")

</div>

Any update in that subject? 🙂

---

<div class="post-metadata">

**Author:** ![Fathul](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/fathul/32/2727_2.png) [@Fathul](https://forum.ghost.org/u/Fathul)\
**Post date:** [March 16, 2020, 9:56am UTC](https://forum.ghost.org/t/use-webp-images-for-posts/6710/3 "2020-03-16T09:56:28Z")

</div>

Up up up

Waiting for updating this thread 🙂

---

<div class="post-metadata">

**Author:** ![Simbob](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/simbob/32/7940_2.png) [@Simbob](https://forum.ghost.org/u/Simbob)\
**Post date:** [May 29, 2020, 8:24am UTC](https://forum.ghost.org/t/use-webp-images-for-posts/6710/4 "2020-05-29T08:24:02Z")

</div>

yes, we need this 🙂

---

<div class="post-metadata">

**Author:** ![thimiraonline](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/thimiraonline/32/22599_2.png) [@thimiraonline](https://forum.ghost.org/u/thimiraonline)\
**Post date:** [May 30, 2020, 5:21am UTC](https://forum.ghost.org/t/use-webp-images-for-posts/6710/5 "2020-05-30T05:21:51Z")

</div>

We need webp.

---

<div class="post-metadata">

**Author:** ![mbedded](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/mbedded/32/6547_2.png) [@mbedded](https://forum.ghost.org/u/mbedded)\
**Post date:** [July 23, 2020, 9:06pm UTC](https://forum.ghost.org/t/use-webp-images-for-posts/6710/6 "2020-07-23T21:06:22Z")

</div>

I guess something linke +1 is not able here but it would be very useful. I tested some images and i was able to half or 1/3 their disk space which improves the browsing speed a lot!

The issue was posted 2 years ago and nothing happened: [No support for webp images · Issue #9448 · TryGhost/Ghost · GitHub](https://github.com/TryGhost/Ghost/issues/9448)

I would appreciate the support of webp or jpeg 2000 a lot! I hope this is added soon. The CMS don’t need to do anything. Just upload the file, set a link to the image and thats it…

---

<div class="post-metadata">

**Author:** ![mbedded](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/mbedded/32/6547_2.png) [@mbedded](https://forum.ghost.org/u/mbedded)\
**Post date:** [July 25, 2020, 7:52am UTC](https://forum.ghost.org/t/use-webp-images-for-posts/6710/7 "2020-07-25T07:52:58Z")

</div>

Addition to my last post because there is no “edit” button:  
You’re able to create your webp-image and just rename it. Eg from `img01.webp` to `image01.jpg` and ghost is able to use the image. When you check your browser (developer tools) you can see that a webp-image is returned and the metadata is correct, too. Even if there is a wrong extension the browser is able to display the image. So you can (temporary) bypass the “only extension gif, jpg, png… are supported” error message.

---

<div class="post-metadata">

**Author:** ![GainfulShrimp](https://avatars.discourse-cdn.com/v4/letter/g/bc79bd/32.png) [@GainfulShrimp](https://forum.ghost.org/u/GainfulShrimp)\
**Post date:** [August 13, 2020, 8:36am UTC](https://forum.ghost.org/t/use-webp-images-for-posts/6710/8 "2020-08-13T08:36:18Z")

</div>

The problem with delivering _only_ webp format images, is that they’re not compatible with either Safari or IE. So, as things stand, assuming your site is visited by the usual cross section of browsers, only ~79% of your readers will see your webp images… ☹

> **[Can I use... Support tables for HTML5, CSS3, etc](https://caniuse.com/#search=webp)**
>
> "Can I use" provides up-to-date browser support tables for support of front-end web technologies on desktop and mobile web browsers.

Hence, it’s not trivial to support webp, because you need to be able to serve **both** the less-efficient-but-more-compatible images (gif, jpg, png) **and** webp, using the most efficient format for the visitor’s browser, depending on whether it supports webp. Implementing this can be done - e.g. checking for the presence of the `Accept: image/webp` request header, but obviously this complicates things compared to just serving the same image for everyone.

When Safari 14 is released (later this year I think), webp should be accepted by a good chunk more of the different browsers in use, but you’re still going to be excluding some of your audience from seeing your images unless you properly integrate webp with a fallback to a traditional image format.

My current solution is to use ngx-pagespeed in front of ghost, which is great and offers loads of optimisation capabilities above just webp images, but it’s a bit technical to set up.

[https://www.modpagespeed.com/doc/build\_ngx\_pagespeed\_from\_source](https://www.modpagespeed.com/doc/build_ngx_pagespeed_from_source)

---

<div class="post-metadata">

**Author:** ![mbedded](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/mbedded/32/6547_2.png) [@mbedded](https://forum.ghost.org/u/mbedded)\
**Post date:** [September 11, 2020, 2:22pm UTC](https://forum.ghost.org/t/use-webp-images-for-posts/6710/9 "2020-09-11T14:22:07Z")

</div>

I agree that there could be issues with Safari-Users but I don’t care of any IE user anymore TBH.  
For my understand: You (as the author of your blog) want to publish images. To have a good loading time yout want to use webp which is often a lot (up to 1/3 of original size) smaller than jpg for example.

I agree that users which are not aware of webp “issues” (some browsers are not able to display webp) and you should inform them. As a “power user” i want to use small files to increase my page loading speed. Today (2020-09-11): Only IE is not support webp and it never will be. MS marked IE offical as obsolete and forces users to use edge (chrome based).

 ![image](https://us1.discourse-cdn.com/flex015/uploads/ghost2/original/2X/0/0a5e1af8dd179ef3a5c7128c0da9c3b4bf20e7e4.png)

Support for OS X will be added soon, so there is no issue either…  
And the server does not care what it has to deliver. When i say: Deliver those static files it doesn’t care of it is an jpg, png, pdf of 5 GB zip file. it just serves this to the client.  
So why would the server bother to serve “both” files? There is only “one” file. The one file i added in my article. The one file that i uploaded. The one file i linked…

EDIT: As i said above. I change the file extension to jpg (even if the file is webp) and everything works fine and i can use much smaller files. It’s a “dirty hack” but it works. Especially when your landing page has 6-7 images of your blog-posts and each of them has only 80 kb instead of 250 kb.

---

<div class="post-metadata">

**Author:** ![Jack](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/jack/32/11078_2.png) [@Jack](https://forum.ghost.org/u/Jack)\
**Post date:** [January 16, 2021, 2:31am UTC](https://forum.ghost.org/t/use-webp-images-for-posts/6710/10 "2021-01-16T02:31:59Z")

</div>

I’ll second this, would be great to be able to use the webp variants I use elsewhere around the non-Ghost portions of my site.

---

<div class="post-metadata">

**Author:** ![Seb](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/seb/32/7983_2.png) [@Seb](https://forum.ghost.org/u/Seb)\
**Post date:** [February 18, 2021, 7:03pm UTC](https://forum.ghost.org/t/use-webp-images-for-posts/6710/11 "2021-02-18T19:03:03Z")

</div>

Hi,

I think .webp support is long overdue. The format is currently supported on ALL of the major browsers and [92%](https://caniuse.com/webp) of internet users browsers.

It could also be combined with the [picture](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/picture) tag (Supported by all of the major browsers and compatible with [95%](https://caniuse.com/?search=Picture) of internet users browsers) to enable support for future image formats like AVIF in the future and at the same time serve older formats like jpg and png.

---

<div class="post-metadata">

**Author:** ![2Max](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/2max/32/12763_2.png) [@2Max](https://forum.ghost.org/u/2Max)\
**Post date:** [April 17, 2021, 11:41am UTC](https://forum.ghost.org/t/use-webp-images-for-posts/6710/13 "2021-04-17T11:41:43Z")

</div>

> [@mbedded](#):
>
> EDIT: As i said above. I change the file extension to jpg (even if the file is webp) and everything works fine and i can use much smaller files. It’s a “dirty hack” but it works

I also changed extension to jpg and it works. Anybody has information about this ? Why is it a dirty hack ? What is impact on image or loading or quality ?

---

<div class="post-metadata">

**Author:** ![denvergeeks](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/denvergeeks/32/7401_2.png) [@denvergeeks](https://forum.ghost.org/u/denvergeeks)\
**Post date:** [April 17, 2021, 4:23pm UTC](https://forum.ghost.org/t/use-webp-images-for-posts/6710/14 "2021-04-17T16:23:12Z")

</div>

Wow this is a cool workaround. Thanks @mbedded!

---

<div class="post-metadata">

**Author:** ![curiousdungbeetle](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/curiousdungbeetle/32/8897_2.png) [@curiousdungbeetle](https://forum.ghost.org/u/curiousdungbeetle)\
**Post date:** [July 7, 2021, 9:00am UTC](https://forum.ghost.org/t/use-webp-images-for-posts/6710/15 "2021-07-07T09:00:49Z")

</div>

This looks implemented in [4.9.0](https://github.com/TryGhost/Ghost/releases/tag/v4.9.0)

---

<div class="post-metadata">

**Author:** ![jeremielondon](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/jeremielondon/32/31714_2.png) [@jeremielondon](https://forum.ghost.org/u/jeremielondon)\
**Post date:** [July 7, 2021, 6:01pm UTC](https://forum.ghost.org/t/use-webp-images-for-posts/6710/16 "2021-07-07T18:01:23Z")

</div>

yes it seems like it, now the question is how to convert all the images and make ghost read them … ?

I think i have part of the answer with this commands that convert all the pictures :

> for F in \*.jpg; do cwebp $F -o `basename ${F%.jpg}`.webp; done

but then how to make ghost read all the webp instead of jpg or png ?

---

<div class="post-metadata">

**Author:** ![Peleke](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/peleke/32/2641_2.png) [@Peleke](https://forum.ghost.org/u/Peleke)\
**Post date:** [July 29, 2021, 6:20pm UTC](https://forum.ghost.org/t/use-webp-images-for-posts/6710/17 "2021-07-29T18:20:53Z")

</div>

I also would be interested in converting all existing images to webp with working links without too much manual work.

---

<div class="post-metadata">

**Author:** ![buarle](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/buarle/32/12209_2.png) [@buarle](https://forum.ghost.org/u/buarle)\
**Post date:** [August 3, 2021, 7:52am UTC](https://forum.ghost.org/t/use-webp-images-for-posts/6710/18 "2021-08-03T07:52:54Z")

</div>

work around might be converting the images but keeping the file extension to the current. The browser usually recognizes that it’s webp and is able to show it.

Another thing would be manual work within the database with something like search and replace of the fileextension. but i’m not into mySQL to much…

Best,  
Markus

---

<div class="post-metadata">

**Author:** ![Yaroslav\_Bulatov](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/yaroslav_bulatov/32/14033_2.png) [@Yaroslav\_Bulatov](https://forum.ghost.org/u/Yaroslav_Bulatov)\
**Post date:** [September 14, 2021, 12:14pm UTC](https://forum.ghost.org/t/use-webp-images-for-posts/6710/19 "2021-09-14T12:14:38Z")

</div>

It seems when I upload animated webp files, Ghost automatically converts it into a still image. Is this by design, or is this a bug?

---

<div class="post-metadata">

**Author:** ![naz](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/naz/32/30666_2.png) [@naz](https://forum.ghost.org/u/naz)\
**Post date:** [September 14, 2021, 2:55pm UTC](https://forum.ghost.org/t/use-webp-images-for-posts/6710/20 "2021-09-14T14:55:09Z")

</div>

This wold need some investigation. Might be that the image optimization lib picks it up and removes animation (found [this issue](https://github.com/lovell/sharp/issues/2648) describing similar behavior). If you find that’s the case would be cool to open an issue on GH ;)

---

<div class="post-metadata">

**Author:** ![Caucasus-and-Mercury](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/caucasus-and-mercury/32/2467_2.png) [@Caucasus-and-Mercury](https://forum.ghost.org/u/Caucasus-and-Mercury)\
**Post date:** [September 14, 2021, 3:12pm UTC](https://forum.ghost.org/t/use-webp-images-for-posts/6710/21 "2021-09-14T15:12:14Z")

</div>

I do know this is the case when using cloudflare’s image optimization. Animated webp are frozen in the first frame.

[Next page](https://forum.ghost.org/t/use-webp-images-for-posts/6710.md?page=2)
