Issue w/ WebP Image Support using GalleryMagick(ImageMagick)

Hey Team,

I am trying to add WebP image support the Bloomreach v13.4 and having some issues with Mime Types when trying to upload a WebP image file.

  • I have followed the instructions for installing and configuring “Gallery Magick Image Processing” Core and Plugins in Bloomreach.
    https://bloomreach-forge.github.io/gallery-magick/index.html

  • I have ImageMagick installed on my computer

  • I have converted a jpg image to webp using the convert cli command

I get an error stating:

Should WebP support be ready out-of-the-box when using GalleryMagick plugin? Are there any additional configuration steps or code changes need to get webp file support to work?

The error message looks like coming from the CMS Image Upload plugin itself, before reaching to the GalleryMagick processor.
Did you try to configure something here?

Thanks for replying so quickly. Yes i updated:

Key: gallery.processor.id
Value: service.magick.command.gallery.processor

I see that there is a validator.id field, is there a different value i should be using there ?
Currently it’s set to:
Key: validator.id
Value : service.gallery.image.validation

Currently only the following image formats are supported for upload: JPEG, GIF, PNG, SVG, BMP, PCX, IFF, RAS, PBM, PGM, PPM and PSD.

I don’t think the validator will allow the webp mime type. This isn’t configurable. You’d need to avoid the standard validation altogether.

You can see this by looking at:
org.hippoecm.frontend.plugins.yui.upload.validation.DefaultUploadValidationService#validateMimeType

which calls:
org.hippoecm.frontend.editor.plugins.resource.MimeTypeHelper#validateMimeType

which calls:
org.hippoecm.frontend.editor.plugins.resource.ImageInfo#getMimeType

It will fail there always.

Is there any solution you can think of that would enable the webp mime type?

You need to use a different validation service. This is a wicket service. You would need to implement:

interface FileUploadValidationService extends IValidationService

Resgister that under an id and use that id in configuration. I’d have to look up the details myself beyond this.

Actually, I’m not 100% sure about the above. I think that the upload plugin implicitly always uses the same service, in which case you would need to replace the upload plugin. At which point I’m not sure it would be worth it. Also, none of this is actually intended as a supported extension point, meaning it may break on upgrades without warning. This hasn’t really changed for years, so it might be safe, but we don’t guarantee that.

It’s definitely possible, it may not be worth it. You could file an improvement request, though I make no promises on whether such a request would be approved or how long it would take to get on the roadmap.