4

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.

crsdahl
  • 545
  • 4
  • 17
  • 2
    Alex Kellner has similar effects... Maybe a look at https://twitter.com/einpraegsam/status/1348609548370771969 can help you. – Julian Hofmann Jan 26 '21 at 19:51

2 Answers2

9

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.

crsdahl
  • 545
  • 4
  • 17
1

Yes that is true, webp must be added to image file list. In addition we faced another problem with webp. If you create an image as jpg with a width and after that the same image as webp also in the same width, only the jpg was generated. That's why we added 1px to the jpg images. Now nearly all picutures are delivered in a modern way on https://www.in2code.de

Alex Kellner
  • 1,263
  • 6
  • 11