webP Images w/ SmushPro

342 zhlédnutíWebhosting
0

Dobrý den,

potřebuji pomoct s webP obrázky v kombinaci s pluginem SmushPro. Plugin mi hlásí:

  1. 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:

  1. 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.
  2. Reload Apache.
  3. 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ář 10. 6. 2022
0
53.63K Odpověď od WEDOS Internet, a.s. 0 Comments

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 10. 6. 2022