Lots of media files on your website can drain your server resources and lead to slow loading times. This may result in a poor user experience (UX) and keep your site out of the top search results. Luckily, 😎 you can extend WordPress and host images externally to prevent this.
When you set up WordPress functionality to host images externally on your site, you can gain all the benefits of using quality media while avoiding the negative side effects. Thanks to a plugin like Optimole, you can easily offload your media to cloud storage with the click of a button.
Why it’s smart to host your images externally
When you host images on WordPress, you have to add them to your WordPress Media Library. This isn’t a bad option for websites with a few images and small amounts of traffic.
However, if you have lots of images, your Media Library can quickly exceed your hosting plan’s storage limits, which can mean that you will need to upgrade to a more expensive plan.
⌛ This can be true even on unlimited storage hosts, as they usually have a “fair use” policy when it comes to storage.
Plus, serving those images adds extra work for your server, together with added bandwidth usage alongside the storage usage.
You’ll enjoy a number of benefits if you decide to extend the functionality of WordPress and host images externally. Here are just a few of the possible advantages:
- Reduced storage required on your hosting plan 💽
- Reduced bandwidth costs 💳
- Better website speed if you combine these externally hosted images with a content delivery network (CDN) 🎿
What’s more, when you decide to extend WordPress and host images externally, you can also migrate your site more easily in the future.
Instead of needing to migrate all of your images to the new host (which can take a lot of time to do for a large Media Library), all you need to do is point your host to the external storage location.
How to host images externally on your WordPress site
Now that you know a bit more about why you might want to extend WordPress and host images externally, let’s take a look at how you can do it. One of the easiest options is to use a plugin like Optimole.
This powerful plugin is built for image optimization. It enables you to compress, resize, offload, and deliver images via an image content delivery network (CDN).
Basically, it can handle every part of image management and optimization on your site, including hosting those images externally.
By using this combined approach, you get the benefits of hosting WordPress images externally while also still ensuring fast performance thanks to the built-in CDN.
Step 1: Install and activate the Optimole plugin
There are plenty of benefits to using the free Optimole plugin on your site. Better yet, you can opt for the paid version of the tool for more advanced features.
Besides giving you the ability to offload your images to an external server, Optimole also resizes your images automatically, depending on your visitor’s browser and viewport.
What’s more, it lets you serve up your images from Optimole’s very own image CDN. The CDN is available across +200 locations, so it doesn’t matter where your visitors are located.
To get started, you can install it directly from your WordPress dashboard. Simply navigate to Plugins → Add New. Then, search for “Optimole” in the search bar:
Click on Install Now followed by Activate.
Once you’ve installed and activated Optimole, you’ll be asked to register for an account and input your personal API key. This will connect you to the Optimole service:
Check that your email address is correct. Then, click on Create & connect your account.
As soon as your account is set up, you’ll receive your API key by email. After you’ve located the email, head back to WordPress and navigate to Media → Optimole.
Here, click on I already have an API key. This will take you to a new page where you can enter your key. After that, select Connect to Optimole:
Once you’ve connected to Optimole, you can access your very own Optimole dashboard. Image optimization begins automatically!
Step 2: Enable image offloading
Now that you can view your Optimole dashboard, you can also tweak the plugin’s settings. It’s important to be aware that some of Optimole’s features work automatically. But, to start hosting your images externally, you’ll need to offload your images to Optimole’s cloud.
To access your Optimole dashboard from inside WordPress, you can go to Media → Optimole.
In your dashboard, you’re able to see the number of images that Optimole has optimized, the average compression rate, and keep track of your monthly visits:
Once you’re in the Optimole dashboard, here’s how to enable the WordPress functionality to host images externally:
- Go to the Settings tab.
- Click on Cloud Integration in the sidebar of the settings area.
- Use the toggle to Enable offloading images.
- Click the Save changes button.
Now, Optimole will start offloading all new images that you upload to your site to host them externally. However, it will not offload any existing images on your site yet, which means your site’s existing images will still be hosted on your server.
To offload all the existing images on your server, click the Sync images button next to Offload existing images. Note – this button will not appear until you save your changes after enabling offloading images:
Now, all of your WordPress images will be hosted externally.
If, for whatever reason, you change your mind about hosting your images on Optimole’s cloud, select Rollback images. This will pull all of your images from the cloud and restore them back to your server.
Step 3: Optimize your images for better performance
At this point, your WordPress images are already being hosted externally. However, there are plenty of extra image optimization features that you can access with Optimole.
The first General setting you can change is Enable image replacement. You’ll want to keep this turned on so that Optimole can continue with its advanced image optimization.
Beneath it, you’ll find the Scale images & Lazy load setting:
Once enabled, this allows Optimole to serve images to your visitors that are the correct size for the device and browser they are using.
Additionally, it lets you lazy load your images. This is another great way to reduce the strain on your server since it defers the loading of images until they are actually needed. As a result, it enables you to boost content delivery.
Next, head to the Advanced settings to override the automatic compression provided by Optimole:
You might prefer to downgrade the image quality when Optimole detects a slow network. To do this, simply turn on the toggle next to Enable network based optimizations.
What’s more, you can head to Resize to enable smart cropping and deliver retina-ready images to your visitors. You can also determine new image crop sizes, specifying an exact height and width:
Finally, under Exclusions, you can select certain images or types of image files to exclude from Optimole optimization and lazyloading. For example, you might want to exclude all images on your homepage or images of specific file formats, like SVG or PNG.
That’s how to host WordPress images externally 🎯
Images are a great way to make your website more engaging. However, they can use up lots of bandwidth and weigh down your site. Fortunately, you can host your WordPress images externally to reduce server usage and boost your page loading times.
To recap, here’s how you can extend WordPress and host images externally:
If you ever want to bring your images back to your server, Optimole also lets you do that with a single click.
For some other ways to improve how your WordPress site handles media, you might want to check out our 🎁 collection of the 11+ best WordPress Media Library plugins.
Do you have any questions about how to host your WordPress images externally? Let us know in the comments section below!