Are you enjoying the extensions? Did you like the support? Help others decide.

Leave a review

file webp thumbnails

More
2 years 6 months ago #5552 by teddyfresco
webp thumbnails was created by teddyfresco
Hi, correct me if I'm wrong: sice there's a ".webp quality" field under header:image > thumbnail, is it right that thumbnails can be created as webp?
If yes, where do I select an option to use webp instead of jpgs?
Thanks and regards

Please Log in or Create an account to join the conversation.

More
2 years 6 months ago #5553 by syw
Replied by syw on topic webp thumbnails
Hello Teddy,

the extension creates Webp thumbnails IF the original image is of Webp mime type.

I can see how it would be interesting to specify which type the thumbnail should be of. Right now, thumbnails are created with the same mime type as the original image.

I'll see how I can improve on that for an upcoming release.

Olivier.

Please Log in or Create an account to join the conversation.

More
2 years 6 months ago #5556 by teddyfresco
Replied by teddyfresco on topic webp thumbnails
Olivier, it would be really great, and I'm wondering if, on due times, you'll take AVIF format into consideration as well. By the way, I've struggled a lot since my server supports
allow_url_fopen
only on request (I thought webp support depended on it), and when I'enabled it, it made Joomla crash, so I've disabled it. I've read a bit about this fopen and many consider it a security threat, they say curl would be a good alternative, maybe you could consider it for the future?
I still don't understand what's its use, don't even know if it's useful for image conversions, only read about it required on LNEP configuration ;-)

Please Log in or Create an account to join the conversation.

More
2 years 6 months ago #5557 by syw
Replied by syw on topic webp thumbnails
AVIF was out of the question until now, it was not supported by the PHP GD library before PHP 8.1 (GD is the library used to create the thumbnails).
I will add support soon for the systems running PHP 8.1 and over.

allow_url_fopen is required to 'read' and process images that are not local.

As stated in the doc and as you mentioned, it is a security risk If you have no control over the images and files that you are getting from outside your server. However, when you manage both servers/sites (both ends), this is not an issue as much. You are not going to inject malicious code into your own images or into your own files or urls.

The extension only allows the retrieval of images if allow_url_fopen is ON, meaning: only if you decide it's ok to take the risk.
Using Curl won't shield you from malicious files.

I'll see if I should 'ease' the restrictions... Now that there is an option to specify if you want to allow remote files or not.

Olivier.

Please Log in or Create an account to join the conversation.

More
2 years 6 months ago #5558 by teddyfresco
Replied by teddyfresco on topic webp thumbnails
Thanks again Olivier, you're always kinder than expected. Take your time with AVIF (php 8.1 still not supported on my server and many others, and AVIF still waiting to be supported by Apple OSs) and whatever regarding allow_url_fopen, since it's only for remote images (which I think involves only a users' niche). Well, if you could find a way to convert images to webp, that would be useful for many (even if they aren't aware of it), since it's one of the top requirements by Google's performance metrics. Regards

Please Log in or Create an account to join the conversation.

More
2 years 6 months ago #5559 by syw
Replied by syw on topic webp thumbnails
Thanks Teddy, I really appreciate.

I will be working on that soon, now that moving to Joomla 4 is out of the way (mostly). I can finally go back to improving things up and adding needed features :-)

Note that even when using WebP or Avif, I do provide fallbacks. So, when you'll be able to choose the format of the thumbnails and if you choose WebP or Avif, the fallback (for un-supporting browsers), will be a thumbnail created from the original image's mime type. And if the original image is of WebP or Avif mime type, the fallback image will be png (mostly to ensure images that have transparency remain transparent).

Olivier.

Please Log in or Create an account to join the conversation.