Using EWWW IO with a CDN

When your site starts to get a decent amount of traffic, you often start looking at ways to make it faster, and reduce the burden on your server. After all, that's half of why you optimize your images, right? One of the most common methods to boost your site speed, especially if you have a global audience, is to use a CDN. There are a lot of them out there, like MaxCDN (Stackpath), KeyCDN, Cloudfront, and the list goes on.

Push vs. Pull

In most cases, you setup your CDN in pull mode, and life moves on. The CDN transparently fetches your images and other assets, and stores them on their servers so that your performance increases with a simple url change. This typically works just great with EWWW Image Optimizer, and requires no extra work, because the images still live right on your server, like they always did. The only thing you might need to do is flush the cache on your CDN, so that they pull the newly optimized images.

However, there's another reason you might be using a CDN, and that is to reduce storage costs. With a CDN like Cloudfront, you can store your images on Amazon's S3 platform, and then you don't have to worry about storage space for images either. Another popular platform for image storage is Azure from Microsoft. When you use S3 or Azure, you will usually have a plugin that is pushing the images to their server, unless you really like manually uploading images to their servers, blech!

So how does that work with EWWW IO? What if you use something like WP Offload S3, and you've deleted the local images?

Fortunately, EWWW IO has built-in support for WP Offload S3, and the Azure Storage plugin. If your images have been removed from the local server, EWWW will use those plugins to fetch a copy of the image, optimize it, and then use the built-in methods to push a new copy of the image to S3 or Azure. If you're using some other S3 plugin, EWWW will generally optimize the local copies of the images, and then trigger another push to get the optimized versions onto S3. We also have a plugin specifically for optimizing S3 buckets. To my knowledge, no other plugins remove images from your server, but if you are using such a plugin, let me know and I'll see if it can be integrated with EWWW IO. Happy Optimizing!

Still need help? Contact Us Contact Us