New Creator

Webp-conversion in FirstSpirit

Dear Community,

I was wondering, if FirstSpirit has a way of converting all images to webp when rendering them, even if they were uploaded in a different format (e.g. jpg)?

Any advice will be welcome :).

Thank you and best regards,


4 Replies
Crownpeak employee

Dear Jenny,

yes, that is possible (if the FirstSpirit version is not too old)

You can find the corresponding documentation here:

The example script can either be executed as a script or within a beanshell console.

Best regards


I set following properties to convert all images to webp.

project = context.getProject();
properties = new java.util.LinkedHashMap();
properties.put("default.targetType", "webp");
project.setCustomProperties("ImageWriteParam", properties);;


What needs to be done to recalculate the images? Output/Generation is still jpg.


0 Kudos

Hello Timo,

FirstSpirit caches the resolutions after they have been calculated (which is normally also desired, as otherwise the resolutions would have to be recalculated each time they are accessed). In this case, however, this leads to the resolutions still being displayed with the wrong type.

The solution is to delete the calculated resolutions. This can be done either with a repository viewer script (please contact support, as misuse could delete the entire content of the project - so I will not post the script here), or with an export/import of the project, where the option to export the automatically calculated resolutions must be explicitly disabled (during the export).

Note: When using SEO URLs, media created as webp will still be created with the existing URL (i.e. with the jpg extension). This should not be a problem and can be changed by deleting the SEO URLs from the context menu.

Best regards

Hi Holger.

I would like to request a third, more convenient way.

As we have hundreds of projects we cannot ex- and import all of them. I also do not like to use the viewer in so many projects, even to prevent support cases on your side 😉

What do you think? What are the options?