Title: Image Optimization
Last modified: June 14, 2020

---

# Image Optimization

 *  Resolved [ormonk](https://wordpress.org/support/users/ormonk/)
 * (@ormonk)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/image-optimization-33/)
 * Litespeed Image optimization limit stuck at 1.
 * Here is what all things I tried
 * 1)Destroyed the earlier optimization
    2)Whitelisted quic.cloud ips
 * In the quic.cloud 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 QUIC.cloud IPs are whitelisted at the firewall.”
 * Please help
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fimage-optimization-33%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  [LucasRolff](https://wordpress.org/support/users/lucasrolff/)
 * (@lucasrolff)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/image-optimization-33/#post-12984307)
 * 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 [quic.cloud IPs](https://quic.cloud/ips?ln) in the code.
 *  Thread Starter [ormonk](https://wordpress.org/support/users/ormonk/)
 * (@ormonk)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/image-optimization-33/#post-12984417)
 * Hi Lucas,
 * Thanks for your fast reply.
 * I had a code in htaccess that would restrict hotlinking. It was copied from [https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cpanel:enable_hotlink_protection](https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cpanel:enable_hotlink_protection)
 * 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 quic.cloud 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
 *  [LucasRolff](https://wordpress.org/support/users/lucasrolff/)
 * (@lucasrolff)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/image-optimization-33/#post-12986146)
 * [@ormonk](https://wordpress.org/support/users/ormonk/)
 * 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)

The topic ‘Image Optimization’ is closed to new replies.

 * ![](https://ps.w.org/litespeed-cache/assets/icon-256x256.png?rev=2554181)
 * [LiteSpeed Cache](https://wordpress.org/plugins/litespeed-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/litespeed-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/litespeed-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/litespeed-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/litespeed-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/litespeed-cache/reviews/)

## Tags

 * [image](https://wordpress.org/support/topic-tag/image/)

 * 3 replies
 * 2 participants
 * Last reply from: [LucasRolff](https://wordpress.org/support/users/lucasrolff/)
 * Last activity: [5 years, 11 months ago](https://wordpress.org/support/topic/image-optimization-33/#post-12986146)
 * Status: resolved