Search code examples
typo3fluidtypo3-10.x

Generate webp image in TYPO3 Fluid


I am trying to have TYPO3 10.4.12 generate webp images as described in the example on this page: https://docs.typo3.org/c/typo3/cms-core/master/en-us/Changelog/10.3/Feature-90416-SpecificTargetFileExtensionInImage-relatedViewHelpers.html

{f:uri.image(image:images.0, fileExtension: 'webp')}

I am using GraphicsMagick and with gm version I get

WebP                       yes

and converting a picture to webp manually via command line works.

Also cwebp is installed.

If I try fileExtension: 'png' it generates a png file so the parameter seems to work.

However the image does not get converted, instead the original unprocessed image gets referenced.


Solution

  • The main problem seems to have been that I needed to add webp to the [GFX][imagefile_ext] configuration.

    Additionally sometimes it only worked after removing all generated images under Remove Temporary Assets in the Maintenance section.