Introduction to ExactDN
What is ExactDN?
There are two primary components to image optimization: compression and resizing. All image optimization programs work to solve the compression problem, but many sites also suffer from issues with image scaling/resizing.
For example, if you have an image that is 800x800 (pixels), and it is displayed on the page at 400x400, it is 4x larger than it needs to be! By merely doubling the dimensions, the actual "area" of the image is quadrupled. With huge images coming from the amazing cameras we have available, the problem could easily be 10x, 20x, or even 100x worse than that. So what can you do about it?
Solving the resizing issues has traditionally required a lot of tedious manual work. However, there is one solution that has attempted to address the issue to some extent, Jetpack's Photon module.
How does it work?
EWWW Image Optimizer addresses the resizing issue by building on the solution implemented by Photon, and extending it further. This involves three things:
- EWWW IO searches for image urls on your site to allow automatic resizing based on the detected image size.
- It then uses fine-tuned resizing servers to avoid overloading your server with resize requests.
- The resizing servers are then combined with a powerful CDN to cache those images for lightning fast image loads. This moves your images closer to your visitors, so that they load quickly anywhere in the world. It also reduces the load on your web server, which can improve performance as well.
Those three things are essentially the building blocks that Photon uses too, so how does ExactDN extend that solution?
- EWWW IO parses the entire page looking for images that need resizing, not just post/page content.
- Uses the srcset attribute to expand the "Responsive Images" feature built into WordPress. This allows the browser to choose even better versions of your images using the srcset attribute, including basic retina (hi-dpi) support. You can use WP Retina 2x for even better retina support with ExactDN.
- Includes even better compression of resized images, using Maximum Lossless compression by default with our Premium Lossy available as an option.
- Caches resized images for one year, with the ability to purge the CDN cache (Photon-cached images are never purged). ExactDN is powered by KeyCDN, so if you need a zone setting changed, just ask!
- Enables one-click WebP image support. Just enable Alternative WebP Rewriting, and you're done. No need to run a bulk optimize or create a single .webp image on your site.
- Allows image quality adjustment by changing a single setting (advanced settings). In the past, if you wanted to increase the quality of all the resizes/thumbnails that WordPress generates, you had to also regenerate all those thumbnails, which could be a very time consuming and lengthy process. ExactDN automatically invalidates the cached images when you change the quality setting.
The Future of ExactDN
We aren't done yet, ExactDN is just getting started. The near roadmap includes several other features and possibilities:
- Some plugins that use JS and alternative HTML tags to render images are not currently resized. If you would like ExactDN to support those images, please contact us and we will work together to implement support for such plugins.
- Sites that use images from third-party sources are not blindly copied to ExactDN. Many have been concerned about Photon's default behavior which "photonizes" all images, even third-party sources. To that end, we will implement a white-list of third-party image sources based on user feedback (at no additional cost). Contact us to learn more about the white-list if you use images from a third-party source that you would like to see included.
Performance of ExactDN
Once ExactDN is fully activated on your site, it will slow down your site, a little. Yes, you read that right, but the slowdown is only temporary.
First of all, there is some overhead required to change all the image urls to point at ExactDN. While the rewriting system is pretty fast, this will increase the load time for your pages. To avoid this slowdown, you should use a caching plugin or server-based caching so that EWWW IO only has to parse each page once. Web-hosts like WP Engine, SiteGround, Kinsta, and FlyWheel usually have server-side caching so that will work just fine. Caching is a critical element of speeding up any WordPress site, so it is something you should be doing anyway.
Second, the resizing process takes more time than just loading an image directly, so on the very first page load, the CDN server will cache a copy of the resized images. We've built several layers of caching into ExactDN, not unlike the "seven layers of the candy cane forest". They aren't terribly delicious, but these caching layers help make sure each image is only ever processed once. So even when the CDN "edge" servers still don't have the images cached, the requests will still be faster than the average web server.
Each monthly subscription allows you to activate ExactDN on a single site. To enable ExactDN, follow these steps:
- Purchase a subscription for the site where you want to enable ExactDN.
- In the WordPress general settings, copy the Site URL setting, and then link the site to your subscription.
- Enable the ExactDN option in the EWWW IO resize settings. Save, and then ensure the Plugin Status shows ExactDN as Verified.
Normally, as long as you copy your Site Address setting directly in step #2 above, all you need to do is enable the ExactDN option, and everything works automatically. EWWW IO will automatically fetch your CDN domain based on the Site URL/Address and it will even monitor your subscription and disable ExactDN for you automatically when your subscription expires (in case you forget).
If you would like a custom CNAME or domain, you'll need manual configuration. For example, if you want to use files.exactdn.com instead of www-example-com.exactdn.com, you'll need to contact support for help setting up the custom alias, and then you can follow the instructions below.
So, should you need to perform any manual configuration, there are a couple constants available. You can define these in wp-config.php:
define( 'EXACTDN_DOMAIN', 'www-example-com.exactdn.com' );
You can find your CDN domain(s) on the Manage Sites page next to each linked site.
The plugin will normally restrict the rewriting to image urls that are "local" to your domain. But if you have your files on a different domain or sub-domain, you can also tell the plugin which domain for which to permit rewriting:
define( 'EXACTDN_LOCAL_DOMAIN', 'https://files.example.com' );
If you configure the EXACTDN_DOMAIN manually, you can use a url OR a domain name, up to you. Otherwise, EXACTDN_LOCAL_DOMAIN must be a url as shown.
ExactDN does not permit internationalized domains (IDNs) unless you convert them to Punycode first. In addition, you may run into length limits if you have a very long Site URL. In either case, you can use the manual setup above to configure ExactDN on your site.
ExactDN will remove all image metadata unless you disable the Remove Metadata option in the Basic settings of the plugin.
ExactDN supports WordPress multi-site installations, and operates with one subscription per domain name. So, if you are using a "sub-folder" install, you can enable ExactDN network-wide, and all sites should be auto-configured under one subscription.
If you are using a "sub-domain" installation, each site will require it's own subscription to operate under ExactDN. If you enable ExactDN network-wide, the plugin will attempt to activate each site with a corresponding subscription, but if you have domains you haven't purchased subscriptions for, ExactDN will remain inactive.
If you need assistance with anything related to ExactDN or EWWW IO, you can always contact us (link below).
Ready to get going? Purchase your ExactDN subscription today!