crsdahl
crsdahl

Reputation: 595

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.

Upvotes: 4

Views: 3038

Answers (2)

Alex Kellner
Alex Kellner

Reputation: 1299

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

Upvotes: 1

crsdahl
crsdahl

Reputation: 595

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.

Upvotes: 10

Related Questions