WEBP in SP Easy Image Gallery - Forum | JoomShaper
Staff replied Extensions

WEBP in SP Easy Image Gallery

Asked by Klaus Liedtke 2 years ago Last activity 1 year ago

Still no webp images in SP Easy Image Gallery ?
But that is the most popular image format of today.

10 replies

Klaus Liedtke Asked this

How this articles can help me?

You support webp in Page Builder Pages.
Why not in SP Image Gallery?
This means the product is unusable. That makes no sense.

Paul Frankowski Senior Staff

Hi Klaus,

It was added to wish-list a week ago.

Klaus Liedtke Asked this

Hi Paul,

Thanks for the info.

Klaus Liedtke Asked this

Hi Paul,

I installed the last version of PB 5.2.8

Now i can't open pages.
Error:

Unhandled Runtime Error

TypeError: i[e] is undefined

Please open the browser console for more information!
Call Stack
l

(2:1252879)
2477

(2:17591)
l

(2:1252884)

What must i do?

Paul Frankowski Senior Staff
2 years ago · edited

Hi Klaus,

Use this most popular method:

Clear browser cached files.
Check Admin & SPPB using **Incognito Mode** (each browser has it).
You can use also 2nd browser and deep refresh.
Then as last step - Clear Joomla cache.
Sometimes you have to wait (5-10-15min) becuase server file cache. 

    If this will not help let me know, but I hope it will.
Paul Frankowski Senior Staff

We published Version 5.2.9 - please download and use it.

Klaus Liedtke Asked this

Hi Paul,

I got a error message when save a image in SP Simple Portfolio and SP Easy Image Gallery:

imagecopyresampled(): Argument #2 ($src_image) must be of type GdImage, null given

The image-typ is webp.

Is that the reason?

Greetings

Klaus

marvays

I ran into the same issue when trying to change the album cover image in SP Easy Image Gallery on Joomla 5:

imagecopyresampled(): Argument #2 ($src_image) must be of type GdImage, string given

Here's how I fixed it:

Enabled WebP support in Joomla:

Go to:
System > Global Configuration > Media

Add "webp" to the list of allowed file extensions:

webp

And also add the MIME type:

image/webp

Modified the gallery helper file:

Path:
/administrator/components/com_speasyimagegallery/helpers/speasyimagegallery.php

In the createThumbs() function, I added WebP support.

For loading WebP images, I added:
case 'webp': $img = imagecreatefromwebp($src); break;

For saving thumbnails as WebP:
case 'webp': imagewebp($new, $dest); break;

Verified that PHP has GD with WebP support (you can check this using phpinfo()).

After this fix, everything works fine — for JPG, PNG, and WebP.

You can see it live on my site:
https://glomontu.cz

Hope this helps others too.

Mehtaz Afsana Borsha Staff

Hi marvays,

Glad to know that you have fixed the issue and thanks for sharing the solution. It helps other users too.

-Thanks.

Log in to reply.