WordPress host images externally

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.

In this post, we’ll take a closer look at why you might want to spare WordPress and host images externally instead. Then, we’ll show you how to do this in three simple steps. Let’s get started!

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 PluginsAdd New. Then, search for “Optimole” in the search bar:

Installing Optimole enables you to extend WordPress to host images externally

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:

Create an Optimole account first to extend WordPress to host images externally.

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 MediaOptimole.

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:

Enter Optimole API key to connect to your account

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 MediaOptimole.

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:

Optimole dashboard

Once you’re in the Optimole dashboard, here’s how to enable the WordPress functionality to host images externally:

  1. Go to the Settings tab.
  2. Click on Cloud Integration in the sidebar of the settings area.
  3. Use the toggle to Enable offloading images.
  4. 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:

Enable 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:

Optimole general settings

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:

Optimole advanced settings

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:

Optimole resizing images

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:

  1. Install and activate the Optimole plugin.
  2. Enable image offloading.
  3. Optimize your images for better performance.

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!

Free guide

4 Essential Steps to Speed Up
Your WordPress Website

Follow the simple steps in our 4-part mini series
and reduce your loading times by 50-80%. 🚀

Free Access

0 Comments
Inline Feedbacks
View all comments

Or start the conversation in our Facebook group for WordPress professionals. Find answers, share tips, and get help from other WordPress experts. Join now (it’s free)!