• Hi,
    I would like to see the original URL of optimized images, so I put your code into .htaccess, as follows:

    RewriteCond %{REQUEST_FILENAME} -f
    RewriteRule ^wp-content/.*[^/]\.(jpe?g|gif|png)$ "/wp-content/plugins/phastpress/phast.php" [L,NC,E=PHAST_SERVICE:images]

    After placing the code and restarting the server, when I compare the size of loaded images (comparison of enabling/disabling optimization in PhastPress) in the dev console it seems they are not compressed at all.

    Can you please double-check if the directives are correct?
    Should be placed in /.htaccess or /wp-content/plugins/phastpress/.htaccess?
    Is possible that after several version updates since the guide has been written the code is not correct?

    Thank you!

Viewing 1 replies (of 1 total)
  • Plugin Author Albert Peschar

    (@kiboit)

    Hi @nuwif,

    Are you using Apache or LiteSpeed? Other servers don’t support .htaccess files.

    There’s no need to restart the web server after updating .htaccess files; they should get picked up automatically.

    The rules should be added to the .htaccess file in the root of your site (where WordPress’ rules are also placed).

    Can you make sure that RewriteRules are working by adding a test rule?

    RewriteRule ^testrewrite$ https://google.com [R=302]

    Navigating to /testrewrite should then redirect.

    –Albert

Viewing 1 replies (of 1 total)
  • The topic ‘Image optimization is not working when seeing their original URL’ is closed to new replies.