webP Images w/ SmushPro
Dobrý den,
potřebuji pomoct s webP obrázky v kombinaci s pluginem SmushPro. Plugin mi hlásí:
- Copy the generated code below and paste it at the top of your .htaccess file (before any existing code) in the root directory.
# BEGIN SMUSH-WEBP
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{DOCUMENT_ROOT}/wp-content/smush-webp/disable_smush_webp !-f
RewriteCond %{HTTP_ACCEPT} image/webp
RewriteCond %{DOCUMENT_ROOT}/wp-content/smush-webp/$1.webp -f
RewriteRule wp-content/uploads/(.*\.(?:png|jpe?g))$ wp-content/smush-webp/$1.webp [NC,T=image/webp]
</IfModule>
<IfModule mod_headers.c>
Header append Vary Accept env=WEBP_image
</IfModule>
<IfModule mod_mime.c>
AddType image/webp .webp
</IfModule>
# END SMUSH-WEBP
To jsem udělal, ale nepomohlo to. Autor pluginu dále radí:
If .htaccess does not work, and you have access to vhosts.conf or httpd.conf, try this:
- Look for your site in the file and find the line that starts with <Directory> – add the code above that line and into that section and save the file.
- Reload Apache.
- If you don’t know where those files are, or you aren’t able to reload Apache, you would need to consult with your hosting provider or a system administrator who has access to change the configuration of your server.
Dokážete mi s tímto pomoct?
Děkuji!
Role: Zákazník
JŠ255861 publikoval nový komentář
1 Odpověď
Dobrý den,
omlouvám se za pozdní reakci. Co přesně Vám po přidání kódu nefunguje? Ukazuje se nějaká chyba?
Role: Podpora Web: https://stackoverflow.com/ Vizitka: Roses are Red, Violets are Blue Unexpected '{' on line 32.
JŠ255861 Odpověděl na otázku