Topic: webp format

Can Showkase handle a .webp format?

Re: webp format

No, sorry.
The Showkase upload module accepts only GIF, JPG/JPEG and PNG.

Re: webp format

Thank you for posting your suggestion in the Feature Requests thread.
I don't know if or when this might be implemented officially but, in the meantime,you might like to try this patch that I created (attached).
It introduces .webp support to Showkase and allows .webp images to be uploaded via the upload module.
Just extract the zip file over your existing Showkase directory. The following files will be replaced:

  • admin/classes/gallery.php

  • admin/classes/imagesizer.php

  • admin/classes/thumbnail.php

  • scripts/plupload/queue.js

Notes:

(1) This patch is not official. It was made by myself, not by the author of Showkase. As such, it has not gone through a rigorous testing regime (although I've tried it out myself and it seems to work fine) and you should use it at your own risk. Be sure to make a full backup of your site first, just in case you need to reinstate your original files at a later date.

(2) The upload module (the third-party Plupload module) only resizes .jpeg and .png images client-side so .webp images are treated the same as .gif images (i.e. they are not resized when uploading). Either be sure to resize your .webp images before using them in Showkase or, if using a Juicebox-Pro gallery, go to 'Site -> Customize Viewers -> Juicebox-Pro (Edit) -> Pro Viewer Options -> Multi-Size Images (Pro)' and select the 'Medium image resize' checkbox.

(3) The files named above have been modified so, if you have made any other modifications to these files (from the stock Showkase v1.7.6 versions), then your modifications will be lost and you'll need to apply them to the files again.

(4) Please use this patch only if you are using Showkase v1.7.6. The original files that I modified were Showkase v1.7.6 stock files. Using this patch on a previous version of Showkase may break other functionality.

I hope this helps.

Post's attachments

showkase.zip 12.67 kb, 1 downloads since 2024-02-11 

You don't have the permssions to download the attachments of this post.

Re: webp format

I haven't tried the patch, but thinking of doing it and I am using a Juicebox-Pro Gallery. Currently I have Large, Medium and Small boxes checked and prior to uploading I size images to a 2048px width. If I have only the Medium checked, what is this going to do with the images dynamic sizing on different devices/resolutions? Will I be sacrificing anything?

Thanks,

Re: webp format

Nothing will change to the original functionality of Showkase or to pre-existing galleries and their .jpeg, .png and .gif images.. The patch just allows .webp as a new file type and all .webp images will be processed in the same way that .gif images are currently processed.
If you have a Juicebox gallery with Large, Medium and Small checkboxes already selected, then just leave them all selected. (If you deselect the Large and Small checkboxes, then you'll lose the largeImageURL and smallImageURL entries from the gallery's 'config.xml' file on the next publish.)

I mentioned selecting the 'Medium image resize' checkbox as, if you don't, then .webp images will not be resized for the Medium size images in your Juicebox galleries (similar to the behavior for .gif images).

As long as the Large, Medium and Small checkboxes are all selected, then you should have large, medium and small .webp images in your Juicebox galleries (for a .webp image source).

Please bear in mind that the patch is unofficial and you might like to try it out in a test Showakse site (in a separate directory of its own so that it does not interfere with your live site) before integrating it into your live site.

Re: webp format

Steven @ Showkase wrote:

(1) This patch is not official..

Is it possible that this patch will be officially included in Showcase functionality in the future?

Re: webp format

@Anglican

It's possible but I really don't know. I'm not the author of Showkase and I don't make such decisions.

However, the patch really just duplicates the way Showkase handles GIF images, but for WEBP images. All the complicated stuff (the actual image processing) is done by native PHP functionality so the extra code required in Showkase to get it working is minimal and I don't see there being any adverse effects.

I hope it will be picked up by the Showkase developers but, if not, at least the patch is here for those that want to use it.