I installed ShortPixel Adaptive Images but it doesn't seem to work.
- Your domain is not associated to your account: How can I associate a domain to my account?
- You don't have enough available optimization credits. If this is the case, please purchase a new plan, or in case you have a monthly quota, upgrade your plan.
- The API URL (located on Settings > ShortPixel AI) is not correct. By default it should be "https://cdn.shortpixel.ai/spai" (see image below); only change it if you know what you're doing.
- You entered a full URL under Settings > ShortPixel AI > Advanced > Excluded selectors. This field can contain only CSS selectors.
- You use a caching plugin or your hosting provider uses a caching mechanism, and the cache has not been flushed after installing and configuring SPAI. The solution is to flush your cache to get rid of old image URLs being displayed. To do a proper cache flushing, please do it in the following order:
- SPAI's cache. Go to Settings > ShortPixel AI, and press the button "Clear CSS cache".
- Cache plugins (Autoptimize, SG Optimizer, WP Rocket, Cache Enabler...)
- Server cache (SiteGround, Bluehost...)
- CDN cache (Cloudflare, StackPath...). Please do it from your CDN's dashboard, not through your cache plugin or hosting dashboard.
- Browser cache (Chrome, Firefox, Edge, Safari...)
- There is another plugin or theme that has a lazy loading feature activated and this conflicts with SPAI. The solution is to deactivate this functionality on the plugin or theme that use it. Please notice that you don't need to disable lazy loading on videos or other resources; only image lazy loading must be disabled.
- jQuery has been disabled either manually or by another plugin. In this case, SPAI will not work properly. Please make sure jQuery is enabled.
- There is a conflict with another plugin (the known conflicts are listed below).
Only some images are not optimized
Sometimes SPAI is actually working correctly, but not all the images are being served from our CDN. This can happen because:
- The images are background images ("background-image" CSS property) declared in .css files. Please activate the "Replace in CSS files" option.
Known conflicts and solutions
- You need to disable the option "JS Combine". Go to LiteSpeed Cache > Page Optimization > JS Settings and there disable "JS Combine" or, possibly better, exclude "ai.min.js" from being combined. (thanks to Mads).
- You need to disable Jetpack's Site Accelerator. Go to Jetpack > Settings > Performance and disable the option "Enable site accelerator".
- In some cases, having the Hummingbird plugin active will disable jQuery's serving. Currently, ShortPixel Adaptive Images requires jQuery to function so the solution is to deactivate this plugin or use a better cache plugin.
- You need to have "Optimize Images" and "Lazy load" turned off. They are located on Settings > Autoptimize > Images.
- If you are aggregating the JS files, you may need to exclude the script "ai.min.js" from optimization to prevent possible conflicts
- You need to deactivate lazy loading for images. Go to Settings > WP Rocket > Media > LazyLoad and disable "Enable for images".
- but sometimes you just need to exclude the "ai.min.js" file from being concatenated.
- There's a chance the styles merging is not compatible with SPAI, depending on your site. Please disable it under Settings > Swift Performance > Optimization > Styles > Merge Styles.
- First, make sure you have disabled the lazy load option on SG Optimizer > Image Optimization > Lazy Load Images.
WP Fastest Cache
- Make sure that "Lazy Load" and "Minify JS" are disabled from WP Fastest Cache's settings.
- Deactivate the Lazy Loading option in Perfmatters' settings to allow SPAI to work correctly. SPAI has already lazy load integrated.