Add Linked Images To Gallery


Add Linked Images To Gallery
Makes local copies of all the linked images in a post, adding them as gallery attachments on the post itself.

I have a photoblog, for my iPhone. I take a lot of pictures, and I want them to post quickly and easily. And I'm lazy. I want to send the photo to Flickr, and let Flickr update my blog. But I also want my main pages to reflect the latest additions. And what's more, I want customized images on the front page, and I need to use the gallery to get those.

This WordPress plugin creates local copies of all external linked images in the SRC attribute of IMG tags. It extracts a list of IMG tags in the post, saves copies of those images locally as gallery attachments on the post, and then offers the option to replace the external link with a link to the local copy.

  • Finds all external images linked in the SRC attribute of IMG tags and makes local copies of those images

  • Allows the SRC to be updated to point to those local copies

  • Can be applied to posts in all categories, or only those selected

  • Can be applied to all authors, or only selected authors

  • Administrator has the option to replace the external src with the url of the local copy. Another option allows the plugin to be applied to all external images, or only to those on Flickr.

This plugin is particularly useful for photobloggers, especially those who update using the mail2blog Flickr API. The plugin will saved the linked image file from Flickr locally.

Planned features

  • Add internationalization support

  • Integrate with Flickr API in order to allow always downloading the original image size regardless of which is linked

  • Additional options to allow running the plugin only for specific users or categories


Download the current stable version: Add-Linked-Images-To-Gallery.

  • 1.0
    • Finally found the "WP_Error on line 48" issue. Added trapping.

    • I'm ready to call this a 1.0

  • 0.9
    • Replaced externimg_loadimage() function with a call to WordPress's media_handle_sideload()

  • 0.8
    • Fixed a pad path, preventing imported images from showing up in WP media library

  • 0.7
    • Fixed a syntax error in creating the new attachment

  • 0.6
    • Suppresses safe_mode warnings from CURL

    • Adds compatibility with WordPress 2.9

  • 0.5
    • Fixes a bug that cause all img tags to be rewritten as the last matched image

  • 0.4
    • Option added to option panel allowing the plugin to run only on posts in specific categories

    • Option added to option panel allowing the plugin to run only on posts by specific authors

  • 0.3
    • Improved pattern matching for images

    • 404 errors not processed

    • Flickr "image-not-found" jpg not processed

    • Improved local file naming

    • Replace feature was replacing URL in entire text. Now only replaces in IMG src.

    • Added feedback when options are saved.

  • 0.2
    • Added options panel

    • User can apply plugin to all external images or choose only to apply to Flickr

    • User can choose to either mark images by custom tag, or to replace image source

    • Custom tag name is user-definable

    • Improved regular expression matching

  • 0.1
    • Initial version

comments powered by Disqus