backdrop-contrib / imagewebp

WebP is a modern image format that provides superior lossless and lossy compression for images on the web
GNU General Public License v2.0
0 stars 2 forks source link

Add requirements check for webP support on the server. #7

Open keiserjb opened 1 year ago

keiserjb commented 1 year ago

I downloaded and enabled the module on multiple existing sites. After turning the module on I visit the homepage and the site is broken.

Error: Call to undefined function imagewebp() in imagewebp_create_webp() (line 24 of /var/www/html/modules/imagewebp/imagewebp.module).

Also, I started with an empty sandbox site from Backdropcms.org. I installed the module and enabled it on the image field in the Post content type. I tried to add a new node. The image field after enabling webp did not work.

Error: Call to undefined function exif_imagetype() in imagewebp_create_from_any() (line 34 of /var/lib/tugboat/backdrop/modules/imagewebp/imagewebp.module).

jenlampton commented 1 year ago

Error: Call to undefined function imagewebp() in imagewebp_create_webp()

Are you sure your server supports webP? I don't think the tugboat servers support webP either, so I suspect that's the problem.

It sounds like we might need to add a requirements check.

keiserjb commented 1 year ago

I think the tugboat has webp enabled.

image

My hosting does not have webp enabled so that's why it did not work there.