webp icon indicating copy to clipboard operation
webp copied to clipboard

Output correct path to webp file instead of rewriting all png/gif/jpeg files and append ".webp"

Open simonschaufi opened this issue 3 years ago • 2 comments

I still have static files that I want to link to without an automatic rewrite to webp simply because they don't exist. Insted TYPO3 should know which files exist as webp and then output the "real" path to the webp file instead of the global "rewrite everyting".

simonschaufi avatar Jul 28 '22 10:07 simonschaufi

Help me to understand your issue … the (server) rewrite rules test for files with the same name, but .webp extension, if the file is not there nothing happens anyway (the server returns the original file) … What exactly would you expect? Please give me some examples.

wazum avatar Jul 28 '22 11:07 wazum

My expectation is that TYPO3 will output /fileadmin/_processed_/9/4/csm_xxx_d103b75947.webp directly without any redirect necessary. Is that possible?

simonschaufi avatar Jul 28 '22 19:07 simonschaufi

Hm, not really, because you link to the original files in the TYPO3 backend. So, maybe it's possible, but that's something outside the scope of my extension. You can try to solve this one yourself. Create a new storage driver (implementing \TYPO3\CMS\Core\Resource\Driver\DriverInterface) and adapt the getFile… methods there.

The another problem is, that not all browsers support webp …

hth

wazum avatar Sep 24 '22 15:09 wazum