Import external attachments

Plugin Banner

Import external attachments

by ryanpcmcquen

Download
Description

Makes local copies of all the linked images and pdfs in a post, adding them as gallery attachments.

Source & support:

https://github.com/ryanpcmcquen/import-external-attachments

Credits

This plugin is based on the work done in the “Import External Images” plugin by MartyThornley.

https://github.com/MartyThornley

HTTPS support added by IvanDoomer:
https://github.com/IvanDoomer

PDF support added by bengreeley:
https://github.com/bengreeley

Most of the JavaScript was rewritten from the original plugin, to reduce the
number of global variables.

  1. Download the “Import external attachments” zip file.
  2. Extract the files to your WordPress plugins directory.
  3. Activate the plugin via the WordPress Plugins tab.

How does this plugin work?

The plugin examines the HTML source of your post when you save it, inspecting each IMG tag, and processing them according to the options you have selected.

Under the default settings, it will find IMG tags with links to images on other web sites and copy those images to your web site, updating the IMG src to point to your copy.

PDF functionality was added by bengreeley.

Does it work with MultiSite?

Yes! It was developed and built (and is used everyday) at PhotographyBlogSites.com – a multisite install.

What if i don’t want to import images from a third party image hosting site?

You can make it ignore any domain you want on the settings page, in case you work with a CDN or photo hosting site and want to keep those images where they are.

Работает но не совсем

By mikulya on June 18, 2024

Плагин выполняет свои функции с классическом редактором, но замораживается процесс, когда попадается статья, с неработающей внешней картинкой. Предварительно лучше избавиться от нерабочих картинок

It worked for me in 2023!

By pichichi on January 30, 2023

This worked for me in 2023. All I had to do was install Classic editor and make sure the post pages wern't using any third party page builders. To import the missing attachments, I then opened the edit page for each post one by one and followed the instructions in the right sidebar. Once done, simply uninstalled classic editor and this plugin. Awesome. Thank you.

Really great, lightweight, awesome job

By sae281062 on March 27, 2020

Works with 5.3.2

A very good module, useful and easy to use.

By mikewaveit on January 18, 2020

I import the images from the posts of a blog migrated from Blogger into WordPress. Works great.

Awesome

By mikeallteams on February 21, 2019

Brilliant plugin. Works great for PDFs.

Very Good and Useful

By swagatamm (swagatam1975) on December 9, 2018

This plugin does more than what it says, it is so good. I only hope it stays updated regularly.

It works (and still works, WordPress 4.9.8)

By messaar on November 25, 2018

It works (and still works, WordPress 4.9.8)

Works well 4.9.6

By epsilon42 on June 20, 2018

I've read of some people having issues with this for larger files but I haven't encountered any issues yet and have dealt with fairly large PDFs and images. Maybe it's your server configuration that's causing issues. Can download attachments on a per post/page basis (via meta box in sidebar) or site wide (Media > Import Attachments from the menu). It's great how it stands out in the editor sidebar so it's obvious the post you're looking at has external content. If there is no external content then the panel isn't visible.

Working on 4.9.4 Like a Dream!

By jamestc989 on March 14, 2018

This should be a premium plugin really... only thing on the market which is working after testing various others. Currently running on a site with over 250 posts all from the old URL and has only had to be "refreshed" once so far. Around 2-3 images per post as far as i'm aware. It's updating the URLs too (the odd post it's missing separate href links) but hey, saving a lot of time.

Best Image import plugin on the market

By dropbobdesigns on December 14, 2017

Many folks are complaining about the plugin only importing a few images and then stopping ... I think the issue is the webpage timeout, not the plugin's fault. I change my firefox webpage timeout to NONE: https://support.mozilla.org/en-US/questions/1042479 I also changed my Wp-config.php timeout to 240: http://www.clickonf5.org/wordpress/solution-for-wordpress-php-error-maximum-execution-time-of-30-seconds-exceeded/11921 I had the issue of the plugin not completing the job before I made these changes. After the changes, it downloaded over a few hundred images on over 70 posts.

1.5.12

  • Adds support for pages.
  • Adds support for .doc and .docx files.
  • Fixes security issue by not directly echoing $_GET['post'] but casting it to int.
  • Adds support for filenames with spaces in them (by removing the space from the exclusion in the regex).
  • Makes the regexes slightly easier to read by making them case insensitive.

1.5.11

Add .jpeg support.

1.5.9

Remove duplicate README.

1.5.8

Fix some typos.

1.5.7

Add GitHub link.

1.5.6

Fix naming.

1.5.5

Make import_images_start_time a function. Hopefully it works now. :^)

1.5.4

Make import_images_start_time globally accessible.

1.5.3

General cleanup.

1.5.1

Merged upstream pull requests from bengreeley and IvanDoomer and changed to ‘Import external attachments’.
Now supports PDFs and HTTPS!

1.3

Fixed case sensitivity, thanks to https://github.com/SidFerreira
Fixed duplicate EXTERNAL_IMAGES_DIR notice

1.1

Fixed title in readme.

Back to top