Cache Images

Cache Images is a plugin (download) that gives users option to sideload images that are hosted on other domains to their own site. Sideloaded images are added to WordPress media library so you can use all tools related to images that you can use with images uploaded through WordPress.

Why would you want to sideload images? Although image hosting on remote server has its good sides (like less load on server and less used bandwidth), there are negative sides too. For example, image can be deleted from remote site so you can’t use it, or site owner can prevent hotlinking or even redirect hotlinking requests to images you wouldn’t want to show to your visitors. Last, but not least, there is an ethical moment since remote site owner will pay for resources used by your server.

Another case of usage is when you migrate your blog from one system to WordPress. for example from free blogging sites like Blogger or WordPress.com to self hosted WordPress powered site.

You can use this plugin by clicking on menu item Cache Remote Images under Tools menu item. On following screen, you will be presented with basic information about usage of plugin and a button Scan which will scan your posts for images hosted on other domains, or button Scan (including linked) which will also scan for images on other domains that are only linked from your site.

After scanning is finished, you will get a list with all domains from which you hotlink images. For every domain, you need to press on a button Cache from this domain that is shown next to domain name. Then plugin will sideload every image from that domain, add image as an attachment of first post where it found it, and update every post where original URL is occurring with new URL.

Since this plugin uses AJAX for sending requests from administration screen, you shouldn’t get out of time PHP errors. Note that it should take some time for sideloading to finish since for every image, plugin needs to sideload image to local server, make all thumbnails, and change original URLs in posts to new location.

Cache Images will handle images hosted on Blogger’s domain in a very smart way so you shouldn’t have to worry about issues with it. Also note that I recommend installation of a plugin WP-Smush.it which will try to reduce file sizes of your images without loss of quality through Yahoo’s free tool smush.it.

If you regularly use images from other domains, you can turn on automatic caching. This caching will be done after you save or publish post. You can turn in on Settings > Media administration page.

Automatic caching settings

Automatic caching settings

This plugin is fully internationalized. You can find .pot file in languages folder where you should place your translation. Please send me your translation by contacting me so that I can include it in next releases. Current translations are:

Cache Images was originally made by infamous Matt Mullenweg, co-founder of WordPress, and I updated it for my own needs, but later decided to send my changes to Matt who in turn gave me rights to update this plugin in wordpress.org SVN repository. AJAX functions are made by fork of code from plugin AJAX Thumbnail Rebuild.

Cache Images is released under the terms of GNU General Public License. It is completely free so if you find it useful you can give something back to authors. Your help could be done by translating plugin to your language, sending bugs and suggestions, promoting plugin in blogs, forums and other websites.

Support for this plugin could be get in comment section of this page or through WordPress support forum (preferred method). Note that I don’t guarantee that I’ll respond to your entries nor that I’ll do it in short period of time. Before posting, please read documentation on this page or on plugin’s page in WordPress plugin directory. I’ll may delete questions for which answers are provided. Please don’t send support question to email, except if you want paid support.

31 responses to “Cache Images”


  1. [...] plugin: Cache ImagesBy Milan Dinić on 1 August 2010 I kind of adopted plugin Cache Images whose original author was infamous Matt Mullenweg, co-founder of WordPress. Since I needed this [...]


  2. [...] Cache Images [...]


  3. [...] Cache Images gives users the option to sideload images that are hosted on other domains to their own site. [...]

  4. Edward de Leau
  5. Edward de Leau
    1. Edward de Leau
    2. Edward de Leau


      And… a lot of people are using image shack, its in lots of examples. So e.g. http://img289.imageshack.us/i/vv3dbusybodies9jq.jpg/ will also show up but is not processed.

  6. mars


    Is it possible please if you can give me a piece of code to insert in the plugin so it can rename images to categoryname-post_id.jpg? Rightnow, this plugin is working great for me except when the image url has “%” character in them, I get blank images.

    Thanks

  7. jaffa


    does this also create thumbnails of the caches images?

  8. marikamitsos


    Hello,
    I have been using your excellent plugin for almost a month now but there are some links that it canNOT save (resulting in empty images). Those are the ones like:
    …/blablabla/IrvingPenn’CretanWomen’1964.jpg
    I found out that this happens because when grabbing the image it gets translated to:
    …/blablabla/IrvingPenn%2527CretanWomen%25271964.jpg

    Reading your previous comments you mention that this is a wordpress problem. Still… It would be great if this could be fixed. Otherwise it works fine.
    Thank you for your work and efforts

  9. Lincoln


    This is a nice plugin, but it doesn’t prefill metadata even when you do so when embedding a remote image into a post (You can still add titles, captions, etc., for remote images inserted by URL). As a result all the images that get sideloaded have “No Title” tags and no other information, so they have to be re-entered manually. It would be nice to see it extract the metadata inputted when inserting a remote image into a post so this step isn’t necessary.

  10. shower radio


    This is just what I needed you rock,! \m/ \m/ :)
    Only thing I noticed was that the first image downloaded was. So had to replace it in my library. thanks

  11. Adam


    Hey,

    I ran into an issued when trying to use the plugin on a website that was imported from blogger to wordpress,. When running the scan I get the yellow box saying that images were found and to pick a domain, however, no domains get listed for me to choose to import from.

    Currently using wordpress 3.2.1 and Cache Images 3.1

    Thanks for your time,

    Adam

  12. Adam


    Problem remedied itself overnight…

  13. Graham


    Can this pluggin be tweeked to scan pages and not just posts?

    Thanks

    1. Graham


      Hi Milan

      Did you received the other post I made showing that the pluggin will not identify the links on that page?

  14. Graham


    OK here it is again.

    This page is created by a WP pluggin. Your pluggin will not identify the remote URL’s on it, for some unknown reason. If I copy and paste the same remote URL into a page or post, it works, but not as it is on this page below, as an example of 15,000 others.

    www dot naples-fl-real-estate dot com/idx/mls-211514402-3665_grand_cypress_dr_naples_fl_34119_7927

  15. jaffa


    Hi

    Is there a way to prevent images from a certain domain from caching?

    Thanks

  16. daretoeatapeach


    Does the cached image still link back to the original, so long as the link was provided at the time? If not, doesn’t this plugin take pictures from merely being hotlinked to then being stolen?

    Thanks for this plugin, just trying to understand so I can have to proper netiquette.

  17. daretoeatapeach


    Wow, that is fantastic. Nice to see you paid attention to the details. Also, thanks for the timely follow up!

  18. Stephen Ford


    Hi there, I am importing images via a rss plugin and it autoposts to my website. But I noticed that the plugin does not automatically cache the images when there posted. Would it be possible to add a function to cron an address to get it to update itself?

  19. Stephen Ford


    Yes I have this checked – Automatically cache images on post’s saving

    I am using the FeedWordpress to automaticaly make my posts .

Leave a Reply

Comment Guidelines:
  • Fields marked with * are required
  • If you want your picture next to comment, open an account at Gravatar
  • If you want to know if someone replied to your comment, check “Notify me of followup comments via e-mail”
  • You can use these XHTML tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>