简体   繁体   中英

Is WEBP output possible on Google App Engine with PHP72 and ImageMagick?

I have a PHP72 app on Google App Engine using ImageMagick to output image resizes.

I added $im->setImageFormat('webp'); and, though it worked fine locally, when deployed to App Engine it generates an "Unable to set image format" error.

I've checked phpinfo() on App Engine and can confirm that their PHP 7.2.23 runtime, with extension=imagick.so enabled, does not include WEBP support. I've also tried the php73 runtime and it does not support it either.

Is it possible to configure App Engine's ImageMagick to include WEBP support?

I don't think much can be done here with standard PHP environment.

The real workaround is using Cloud Run if you are not using some specific features not yet implemented there. Another thing that might work is switching to flexible with custom runtime and using your own image with preconfigured ImageMagick.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM