• Hi I have converted all my images and enabled the rewrite rule option but I am still getting served the original JPEG or PNG photo and not the optimized WEBP or AVIF file when I visit the website. I have confirmed the images were converted successfully and show the new versions in the media library. I believe it is just not replacing the links with new optimized versions on the site.

Viewing 13 replies - 1 through 13 (of 13 total)
  • Thread Starter tjcheyne

    (@tjcheyne)

    For extra clarification I am using nginx web server and I can see the rewrite rules were added to the htaccess file in both the uploads directory and wp-content directory.

    Plugin Support nicholas2019

    (@nicholas2019)

    Hello @tjcheyne ,

    1. To verify if the images are loaded in WebP or AVIF format, you can right-click on the image, select “Inspect,” then navigate to the “Network” tab in the browser’s developer tools. There, you’ll see the image format type (WebP or AVIF). If you’re certain that the images are not loading in WebP or AVIF format, please provide the page links and specify the particular images in question. We are going to review them.
    2. For LiteSpeed Cache users, clear the cache after CompressX finishes converting images. If your site is hosted on a LiteSpeed web server, restart the server after activating CompressX for the rewrite rule in .htaccess files to take effect.
    3. If you are using Cloudflare CDN, please ensure that you clear the Cloudflare cache. Currently, other CDN services are not supported.
    4. If the issue persists after these steps, consider switching to the picture tag instead of using rewrite rule.

    Kind regards.

    Thread Starter tjcheyne

    (@tjcheyne)

    @nicholas2019 one example you can see on this page: https://www.theplantpioneer.ca/foaming-hand-soap-recipes-for-fall/ the first large photo i confirmed is loading the jpg using inspect element and the network tab. here is a screenshot of the element and then also a screenshot of my dashboard showing the converted versions should exist for the image

    We are using nginx without any caching enabled and we have disabled the cloudflare cache by turning on dev mode.

    • This reply was modified 1 year, 4 months ago by tjcheyne.
    Plugin Support tonyrobins

    (@tonyrobins)

    Hello @tjcheyne

    Would you send us a debug zip from the System information tab of CompressX to help further identify the issue? Please also include a link to this thread when you do that to help track the issue.

    Until the issue is finally identified and resolved, you can use the picture tag option.

    All the best,

    Thread Starter tjcheyne

    (@tjcheyne)

    @tonyrobins

    Where do I send it to you?

    Plugin Support tonyrobins

    (@tonyrobins)

    @tjcheyne

    You can send it to support(at)wpvivid.com

    All the best,

    I’m in nginx too! i use TAG rules and put the right code you find on compressx page on nginx conf and for me the conversion works like a charm

    Thread Starter tjcheyne

    (@tjcheyne)

    @nikketrikke do you mean picture tag rule? and where is the code for nginx I don’t see any extra configuration on the plugin page.

    https://compressx.io/docs/config-nginx-htaccess-rules/

    read here you have to put tht code in nginx conf file I hope you have the rights to modify it… if not ask to yor server register

    PS on nginx server or proxy nginx —-> htaccess rules not work !!!

    Plugin Support tonyrobins

    (@tonyrobins)

    Hello @tjcheyne

    On an Nginx server, there should be a warning message on CompressX asking for extra configuration of the server. Please do that if you haven’t and see if that resolves the issue.

    All the best,

    Thread Starter tjcheyne

    (@tjcheyne)

    @tonyrobins I don’t get any warning for extra configuration but I will give that a try

    Plugin Support nicholas2019

    (@nicholas2019)

    Great.

Viewing 13 replies - 1 through 13 (of 13 total)

The topic ‘Rewrite rule not working’ is closed to new replies.