Streaming live at 10am (PST)

WebP Format – The Successor of JPEG

Is it possible to use WebP files in Webflow ?

I find this article « RewriteRules for Apache (.htaccess) » very interesting !

A forwarding rule on the server level takes care of distributing the requests for the correct file formats, independently of the browser. In plain terms: the embedding of pictures in the HTML source code does not change in any way and is not affected (e.g. Your Image). The distribution of the correct image is ensured by the RewriteRule in the system file .htaccess:

RewriteEngine On RewriteCond %{HTTP_ACCEPT} image/webp RewriteCond %{DOCUMENT_ROOT}/$1.webp -f RewriteRule ^(path/to/your/images.+)\.(jpe?g|png)$ $1.webp [T=image/webp,E=accept:1] Header append Vary Accept env=REDIRECT_accept

AddType image/webp .webp

When a JPEG or PNG image is displayed in the browser, it is exchanged for a WebP file by the server and assigned the MIME type image/webp. The file extension (file format) does not change.
Important: The snippet above .htaccess needs to be positioned relatively high up.