External Media without Import

Description

By default, adding an image to the WordPress media library requires you to import or upload the image to the WordPress site, which means there must be a copy of the image file stored in the site. This plugin enables you to add an image stored in an external site to the media library by just adding a URL linking to the remote image address. In this way you can host the images in a dedicated server other than the WordPress site, and still be able to show them by various gallery plugins which only take images from the media library.

The plugin provides buttons and inputs in the ‘Media’ -> ‘Add New’ page, the media upload panel and a dedicated Add External Media without Import submenu page. Therefore you can either add an external media before (or after) editing any post or page, or in the process of editing a post or page without interrupting the editing process.

View on GitHub

Screenshots

  • Click 'Add External Media without Import' button in the media upload panel.
  • Enter the url of the external media you'd like to add to the media library and click 'Add'.

Installation

  1. Upload the plugin files to the /wp-content/plugins/external-media-without-import directory, or install the plugin through the WordPress plugins screen directly.
  2. Activate the plugin through the ‘Plugins’ screen in WordPress.

Then you can use the plugin to add external media wihtout import:

Click the ‘Add New’ button in the ‘Media’ -> ‘Library’ page, the media upload panel will show up, in which there’s an ‘Add External Media without Import’ button. Click it.

If the Library page is in grid mode, the ‘Add a media from URL’ panel will appear.

If the Library page is in list mode, clicking ‘Add External Media without Import’ in the upload panel directs you to the ‘Add External Media without Import’ submenu page, which can also be accessed by clicking ‘Media’ -> ‘Add External Media without Import’ in the admin menu. The input interface of the submenu page is the same as that in grid mode.

Fill in the URL and click the ‘Add’ button, the remote image will be added.

Note that WordPress needs to know in advance the width and height of an image in order to correctly display it in the media library page and any post/page. In most cases, the plugin resolves these properties automatically without worrying you. But in rare cases, the plugin may fail to get the width and height of the image you specify when you click ‘Add’ in the ‘Add a media from URL’ panel. In that case, some input fields will show up and let you fill in the properties manually.

FAQ

Installation Instructions
  1. Upload the plugin files to the /wp-content/plugins/external-media-without-import directory, or install the plugin through the WordPress plugins screen directly.
  2. Activate the plugin through the ‘Plugins’ screen in WordPress.

Then you can use the plugin to add external media wihtout import:

Click the ‘Add New’ button in the ‘Media’ -> ‘Library’ page, the media upload panel will show up, in which there’s an ‘Add External Media without Import’ button. Click it.

If the Library page is in grid mode, the ‘Add a media from URL’ panel will appear.

If the Library page is in list mode, clicking ‘Add External Media without Import’ in the upload panel directs you to the ‘Add External Media without Import’ submenu page, which can also be accessed by clicking ‘Media’ -> ‘Add External Media without Import’ in the admin menu. The input interface of the submenu page is the same as that in grid mode.

Fill in the URL and click the ‘Add’ button, the remote image will be added.

Note that WordPress needs to know in advance the width and height of an image in order to correctly display it in the media library page and any post/page. In most cases, the plugin resolves these properties automatically without worrying you. But in rare cases, the plugin may fail to get the width and height of the image you specify when you click ‘Add’ in the ‘Add a media from URL’ panel. In that case, some input fields will show up and let you fill in the properties manually.

Reviews

too many error messages

I’m sorry, nice idea, but really can’t use a plugin that generate so many error messages, break the admin layout and in the end don’t even works.

Simple and very excelent!

It does one thing and it does it very well, simple so far very robust and super happy with its performance, I have no image, in my wordpress folder and the site goes very fast. Keep on like this I congratulate you and I hope you continue to keep this great plugin

Truly great

This is a superb plugin! I’ve been able to use it to create Media Library entries not only to original local mp4’s elsewhere on my server, but also to shortlinks that are managed outside WordPress by an instance of the “yourls” application I’ve installed on the hosted server I use.
This combination makes it very easy to keep videos at a single location on my server space, rather than having to copy them over to one or multiple WordPress installations. Less space required on the server, and no problems with having to manage multiple copies of folders full of videos.
I do have one suggestion. For video files in the Media Library, no thumbnail appears in the Media Library as it does for still images. Instead, a generic icon is used. It’d be helpful if this plugin could overlay video filenames on top of these icons, the same as the Media Library does for videos that are uploaded directly to it through the built-in WordPress method.

Thank you

Hi,
your plugin is awesome and works out of box. Something like this really should be the part of core.
Your code helped me a lot to understand how this works. I needed to save images in other CMS and just display them in WP site and with your code I was able to do it. Thank you again.

The Pot of Gold at the end of the rainbow

I’ve been looking around for a solution to the irritating issue of not being able to use external media for a lot of different WP functions (background images, page builder filters etc) — this solves it

thank you

Read all 12 reviews

Contributors & Developers

“External Media without Import” is open source software. The following people have contributed to this plugin.

Contributors

Changelog

Version 1.0.2.1

Just changed te readme file, the changelog in previous readme file seems not work.

Version 1.0.2

Fixed XSS Security Vulnerabilities and bug with mime types including ‘+’ such as ‘image/svg+xml’.

Thank Mike Vastola.

Click to see detailed information of this bug.

Version 1.0.1

Fixed a bug which causes HTTP 500 – internal server error.

The error occurs in previous version when the plugin fails to get the image size and MIME type. The HTTP 500 error causes the plugin message not correctly displayed in the media upload panel. It also causes the Add External Media without Import page broken.