Support » Plugin: LiteSpeed Cache » Image Optimization

  • Resolved ormonk


    Litespeed Image optimization limit stuck at 1.

    Here is what all things I tried

    1)Destroyed the earlier optimization
    2)Whitelisted ips

    In the dashboard I am getting error notifications as well

    1)”Failed to retrieve image for optimization
    Failed to retrieve image File not found from node File not found.”

    2)”Failed to notify WP to pick up optimized images
    Unable to notify WordPress to pick up images. Check IPs are whitelisted at the firewall.”

    Please help

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Your site blocks access, first of all, to download a bunch of images (returning a “403 forbidden”) when the images are being fetched.

    Notifying WordPress fails due to your WordPress site restricting access to the REST API:

    {"code":"rest_authentication_error","message":"Sorry, you do not have permission to make REST API requests.","data":{"status":401}}

    The image optimization service will do a callback to the WordPress REST API under the /wp-json/litespeed namespace, so ideally you’d want to whitelist that full namespace.

    If you’re using a security plugin in WordPress that does this REST API protection, you’ll often have the possibility to whitelist specific namespaces or endpoints. If you’re having manual code added to your theme, you’ll have to modify the code to not restrict REST API access for the /wp-json/litespeed namespace, or whitelist the IPs in the code.

    Hi Lucas,

    Thanks for your fast reply.

    I had a code in htaccess that would restrict hotlinking. It was copied from

    For the REST API, I had the plugin perfmatters which disabled the API. But before I was making this thread I had it disabled, because I had seen your other replies asking the users to do the same.

    I can access it on /wp-json without any problems.

    I also have just flushed can also incase if the cached version was the culprit.

    And now it just started working again.

    No idea if it was the hotlinking protection that created the problem.

    Thank you for your help


    I can see the hotlink protection used above would indeed cause the 403 errors for the images. I’ll get that fixed today, the hotlink protection expects a trailing slash, which currently isn’t being sent when trying to fetch the image, so I’ll add the trailing slash.

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.