WpW: Using Jetpack’s Photon CDN With LSCache
Welcome to another installment of WordPress Wednesday!
Today’s topic is: Jetpack Photon CDN and LiteSpeed Cache
Disclaimer: The information contained in this post is accurate for LSCWP v220.127.116.11 [release log]. If you are using a newer version of the plugin, some details may have changed. Please refer to our wiki for the latest!
What is Photon?
Automattic’s Jetpack plugin allows self-hosted WordPress blogs to use some of the functionality that is natively available to WordPress.com blogs. One of the available functions is a content delivery network (CDN) for images. Originally, this service went by the name “Photon,” but now it they simply call it “Jetpack Image CDN.” (Many people still refer to it as Photon, which is why I mention it.)
Use of the image CDN is contingent upon your site being Jetpack-connected. If you disconnect Jetpack from your site, you are no longer allowed to use the image CDN.
Using Jetpack Image CDN with LSCWP
Jetpack’s Image CDN and LiteSpeed Cache for WordPress are 100% compatible and may be used together right out of the box.
Normally we recommend enabling CDN support in the LiteSpeed plugin, and then uninstalling any CDN-specific plugin you may have had. That is not the case here.
Because of Jetpack’s rule that Jetpack must remain connected to your site, you are not allowed to uninstall their plugin if you want to continue to use their image CDN.
So, how do you make all of this work when you have both Jetpack and LiteSpeed plugins installed? It’s simple. You let Jetpack do its thing, and set up LiteSpeed to stay out of the way:
- Turn on the image CDN feature in Jetpack.
- Leave Enable CDN set to
OFFin LiteSpeed Cache > Settings > CDN.
LSCache for WordPress respects the settings of other CDN plugins, when LiteSpeed’s CDN support is turned off.
A Note about Image Optimization
LiteSpeed Cache has an Image Optimization service, but we don’t recommend you use it, if you have Jetpack’s Image CDN enabled. Jetpack’s CDN automatically does its own optimization, and will ignore the LiteSpeed-optimized images.
Additionally, Jetpack has its own WebP replacement functionality, so do not enable LiteSpeed’s Image WebP Replacement setting in the Media tab.
If you want to use Photon, then LiteSpeed will respect that, as long as you leave LiteSpeed’s CDN and Image Optimization features turned off.
One exception: if you have multiple CDNs in use (i.e., Jetpack for the images and, say, MaxCDN for other static content), you may enable LiteSpeed’s CDN support, but be sure to configure it only for the file types not served by Jetpack.
Have some of your own ideas for future WordPress Wednesday topics? Leave us a comment!
Don’t forget to meet us back here next week for the next installment. In the meantime, here are a few other things you can do:
- Subscribe to the WordPress Wednesday RSS feed
- Download LiteSpeed Cache for WordPress plugin
- Learn more about the plugin on our website