Webp thumbnail cannot not be shown


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.

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…


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

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.

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).

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

@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”.)


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

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

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

Thank you for your help!