-----------+--------------------------------------
Type | Maximum length
-----------+--------------------------------------
TINYTEXT | 255 (2^ 8−1) bytes
TEXT | 65,535 (2^16−1) bytes = 64 KiB
MEDIUMTEXT | 16,777,215 (2^24−1) bytes = 16 MiB
LONGTEXT | 4,294,967,295 (2^32−1) bytes = 4 GiB
-----------+--------------------------------------
<picture>
<source srcset="img/test.webp" type="image/webp">
<source srcset="img/test.jpg" type="image/jpeg">
<img src="img/test.jpg" alt="test image">
</picture>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_ACCEPT} image/webp
RewriteCond %{DOCUMENT_ROOT}/$1.webp -f
RewriteRule (.+)\.(jpe?g|png)$ $1.webp [T=image/webp,E=REQUEST_image]
</IfModule>
<IfModule mod_headers.c>
Header append Vary Accept env=REQUEST_image
</IfModule>
<IfModule mod_mime.c>
AddType image/webp .webp
</IfModule>