WpW: Using Jetpack’s Photon CDN With LSCache

WordPress Wednesday: Jetpack Photon CDN and LiteSpeed Cache

Written by

in

 

 

WordPress Wednesday: Jetpack’s Photon CDN and LiteSpeed Cache

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 v2.1.1.1 [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.

 

Jetpack’s Photon CDN and LiteSpeed Cache: Three Airplanes in Formation at an Air Show

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:

  1. Turn on the image CDN feature in Jetpack.
  2. Leave Enable CDN set to OFF in 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.

To Summarize

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:

Comments

8 responses to “WpW: Using Jetpack’s Photon CDN With LSCache”

  1. Mike Avatar
    Mike

    Great article. If using the Jetpack CDN for images, should I use Jetpack Lazy Load or Litspeed Cache Lazy Load? Does it matter which one?

    1. Lisa Clarke Avatar
      Lisa Clarke

      I haven’t tested that scenario myself, but I suspect that the two plugins implement Lazy Load in much the same way. You should be able to use whichever one feels most comfortable to you.

  2. ife Avatar

    I can’t seem to follow the path you speak of.

    LiteSpeed Cache > Settings > THERE IS NO “CDN” only “ENABLE CACHE”

    1. Lisa Clarke Avatar
      Lisa Clarke

      CDN is a tab along the top of the settings page. Click on the CDN tab, and you’ll see all of the CDN-related options. You can see what it looks like on our wiki.

  3. christopher Avatar

    it’s nice I have tested it and it is working

  4. B Avatar
    B

    THANK you. Took me an hour to find somebody weighing in on whether / how to make Jetpack’s CDN play nicely with Litespeed. Appreciate the recommendation.

  5. diskretter Avatar

    thank you very much very helpful article. I was afraid that installing these 2 plugins would cause my website to crash, but after reading this article I’m not worried anymore 🙂

  6. Harsh Kumar Avatar

    Thank You its really a Nice article and help me to come out this confusion that using both plugin slow down my website but it works fine.

Leave a Reply

Your email address will not be published. Required fields are marked *