# Webp thumbnail cannot not be shown

**URL:** <https://community.modx.com/t/webp-thumbnail-cannot-not-be-shown/5469>\
**Category:** Support\
**Created:** [June 16, 2022, 7:26am UTC](https://community.modx.com/t/webp-thumbnail-cannot-not-be-shown/5469 "2022-06-16T07:26:08Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![LimanLei](https://community.modx.com/letter_avatar_proxy/v4/letter/l/b487fb/32.png) [@LimanLei](https://community.modx.com/u/LimanLei)\
**Post date:** [June 16, 2022, 7:26am UTC](https://community.modx.com/t/webp-thumbnail-cannot-not-be-shown/5469/1 "2022-06-16T07:26:08Z")

</div>

### Summary

In order to preview the webp iamges, I updated the MODX version from 2.6.0 to 2.8.4.

### Step to reproduce

1.) To confirm the setting of [Uploadable File Types] and [Uploadable Image Types] that have the value: webp.

2.) To confirm the properties for the source that support the image extensions as **webp**

3.) To start upload webp image

### Observed behavior

1.) The thumbnail for webp file still could not be shown in Media Browser as following figure.

 ![image](https://modx-community.s3.dualstack.us-east-1.amazonaws.com/original/2X/3/34890cc65d1a66e7b0a64188832cc98a3eb04514.png)

2.) **Error outputting thumbnail: OutputThumbnail() failed because !is\_resource($this-\>gdimg\_output) in file “phpthumb.class.php” on line 647**

### Expected behavior

Webp iamges could be previewed as jpg , png , svg ,and so on…

### Environment

MODX version: **MODX Revolution 2.8.4-pl (traditional)**  
PHP version: **7.1.28**

---

<div class="post-metadata">

**Author:** ![halftrainedharry](https://community.modx.com/user_avatar/community.modx.com/halftrainedharry/32/1063_2.png) [@halftrainedharry](https://community.modx.com/u/halftrainedharry)\
**Post date:** [June 16, 2022, 10:29am UTC](https://community.modx.com/t/webp-thumbnail-cannot-not-be-shown/5469/2 "2022-06-16T10:29:27Z")

</div>

I can’t reproduce this.

* * *

If you go to the top menu “Manage” → “Reports” → “System Info” and then click on “View” on the line “phpinfo():” and scroll down to the section “gd”, can you check if “WebP Support” is enabled?

Maybe the PHP version is too old.

---

<div class="post-metadata">

**Author:** ![smashingred](https://community.modx.com/user_avatar/community.modx.com/smashingred/32/4354_2.png) [@smashingred](https://community.modx.com/u/smashingred)\
**Post date:** [June 16, 2022, 5:31pm UTC](https://community.modx.com/t/webp-thumbnail-cannot-not-be-shown/5469/3 "2022-06-16T17:31:03Z")

</div>

PHP 7.1 is long past end of life (as of December 2019). The current PHP 7 version of PHP 7.4 is EOL as of November 2022. I’d make sure you choose a different version of PHP or move to a machine or host that doesn’t run severely out of date software (which is a risk of compromise unless under some form of maintenance agreement for self-patching).

---

<div class="post-metadata">

**Author:** ![bwente](https://community.modx.com/user_avatar/community.modx.com/bwente/32/104_2.png) [@bwente](https://community.modx.com/u/bwente)\
**Post date:** [June 16, 2022, 7:40pm UTC](https://community.modx.com/t/webp-thumbnail-cannot-not-be-shown/5469/4 "2022-06-16T19:40:13Z")

</div>

I can. This is a brand new site on MODX Cloud.

 ![image](https://modx-community.s3.dualstack.us-east-1.amazonaws.com/original/2X/c/c5847b712d7d7132123d503db66f07a0b6845bc6.png)

---

<div class="post-metadata">

**Author:** ![halftrainedharry](https://community.modx.com/user_avatar/community.modx.com/halftrainedharry/32/1063_2.png) [@halftrainedharry](https://community.modx.com/u/halftrainedharry)\
**Post date:** [June 16, 2022, 7:55pm UTC](https://community.modx.com/t/webp-thumbnail-cannot-not-be-shown/5469/5 "2022-06-16T19:55:14Z")

</div>

@bwente Did you update the property “imageExtensions” of your Media Source?

(In the top menu go to “Media” → “Media Source”, Right-Click on the Media Source and select “Update Media Source”, then add “webp” to the list in the property “imageExtensions”.)

---

<div class="post-metadata">

**Author:** ![bwente](https://community.modx.com/user_avatar/community.modx.com/bwente/32/104_2.png) [@bwente](https://community.modx.com/u/bwente)\
**Post date:** [June 16, 2022, 8:40pm UTC](https://community.modx.com/t/webp-thumbnail-cannot-not-be-shown/5469/6 "2022-06-16T20:40:29Z")

</div>

Ha. No I did not. I just used the defaults. That worked! Thank you.

---

<div class="post-metadata">

**Author:** ![LimanLei](https://community.modx.com/letter_avatar_proxy/v4/letter/l/b487fb/32.png) [@LimanLei](https://community.modx.com/u/LimanLei)\
**Post date:** [June 17, 2022, 1:05am UTC](https://community.modx.com/t/webp-thumbnail-cannot-not-be-shown/5469/7 "2022-06-17T01:05:45Z")

</div>

Checked the “phpinfo():”, and the "“ **Webp Support** ” is not found as following figure.

 ![image](https://modx-community.s3.dualstack.us-east-1.amazonaws.com/original/2X/3/38f9f18e98dabc0213039ac50615ac2d1bd461d3.png)

I will try to upgrade the version of PHP to fix the issue.

Thank you for your help!

---

<div class="post-metadata">

**Author:** ![ndcstudio](https://community.modx.com/user_avatar/community.modx.com/ndcstudio/32/3610_2.png) [@ndcstudio](https://community.modx.com/u/ndcstudio)\
**Post date:** [October 23, 2023, 6:39pm UTC](https://community.modx.com/t/webp-thumbnail-cannot-not-be-shown/5469/8 "2023-10-23T18:39:31Z")

</div>

Hi, today I have the same problem, only for .jpg

 ![image](https://modx-community.s3.dualstack.us-east-1.amazonaws.com/original/2X/3/34736e36803e87dc0278a2dc6421b897c5c191e8.png)  
What could be the problem?

**Configuration:**  
MODX Revolution 3.0.4-pl (traditional)  
PHP Version 7.4.33

---

<div class="post-metadata">

**Author:** ![halftrainedharry](https://community.modx.com/user_avatar/community.modx.com/halftrainedharry/32/1063_2.png) [@halftrainedharry](https://community.modx.com/u/halftrainedharry)\
**Post date:** [October 23, 2023, 6:54pm UTC](https://community.modx.com/t/webp-thumbnail-cannot-not-be-shown/5469/9 "2023-10-23T18:54:46Z")

</div>

> [@ndcstudio](#):
>
> MODX Revolution 3.0.4-pl (traditional)  
> PHP Version 7.4.33

Take a look at this post:

> [@MODX 2.8.6/3.0.4 + PHP 7.4 breaks thumbnails in the manager](https://community.modx.com/t/modx-2-8-6-3-0-4-php-7-4-breaks-thumbnails-in-the-manager/7100):
>
> Summary The version of phpThumb that comes with MODX 2.8.6 has a line of code that throws a fatal error in PHP 7.4. (The phpThumb library is used in the MODX manager to generate the thumbnails in the media browser and the preview for image TVs.) Step to fix the issue To fix the issue, remove the word mixed from this line in the file core/model/phpthumb/phpthumb.class.php Alternatively change the PHP version to at least 8.0. Related issue on Github Environment MODX 2.8.6-pl PHP 7.4
