在TYPO3 Fluid中生成webp图像

crs*_*ahl 4 typo3 fluid typo3-10.x

我试图让 TYPO3 10.4.12 生成 webp 图像,如本页示例中所述: https: //docs.typo3.org/c/typo3/cms-core/master/en-us/Changelog/10.3/Feature -90416-SpecificTargetFileExtensionInImage-latedViewHelpers.html

{f:uri.image(image:images.0, fileExtension: 'webp')}
Run Code Online (Sandbox Code Playgroud)

我正在使用 GraphicsMagick 并gm version得到

WebP                       yes
Run Code Online (Sandbox Code Playgroud)

并通过命令行手动将图片转换为 webp。

还安装了 cwebp。

如果我尝试fileExtension: 'png'它会生成一个 png 文件,因此该参数似乎可以工作。

但是,图像不会被转换,而是引用原始的未处理图像。

crs*_*ahl 10

主要问题似乎是我需要将 webp 添加到配置中[GFX][imagefile_ext]

此外,有时它只有Remove Temporary Assets在删除“维护”部分下的所有生成的图像后才起作用。