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.

34 Comments





    1. Sorry for the late reply.

      If images were hotlinked, then they are proceeded with this plugin but built-in WordPress function didn’t sideload it for some reason.

      If images were only linked, only links ending with jp(e)g|png|gif are proceeded because it would mean that all links on a website would be proceeded if we didn’t have this condition.

      In both cases, just this three types can be cached because only those are recognized as images by WordPress.

      Reply

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

    Reply

    1. Sorry for the late reply.

      This plugin uses built-in WordPress function for handling of images that uses filename derived from URL so it means that it isn’t possible to achieve what you want.

      Reply

  2. does this also create thumbnails of the caches images?

    Reply
  3. 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

    Reply

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

    Reply

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

    Reply

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

    Reply
  7. Graham


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

    Thanks

    Reply
    1. Graham


      Hi Milan

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

      Reply
  8. 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

    Reply

  9. Hi

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

    Thanks

    Reply

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

    Reply

    1. If link is identical as image source, it is replaced. For example, in <a href="http://example.com/image.jpg"><img src="http://example.com/image.jpg" /></a> both are replaced, however, in <a href="http://example.com/image"><img src="http://example.com/image.jpg" /></a> only image is replaced but link stays since it’s different.

      Reply

  11. 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?

    Reply

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

    I am using the FeedWordpress to automaticaly make my posts .

    Reply
  13. Ashley


    Hey! I know this is an older plugin but I love it! Great work :) Do you know of any way I could add this to cron so it’s automated? Thanks!!

    Reply

    1. Because of how it’s coded, it would be easier to first rewrite plugin (which needs to be done anyway) and then to have cron.

      But, it already has setting which you can enable to have automatic caching when future post are saved. Have you tried it?

      Reply

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 HTML tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Your email address will not be published. Required fields are marked *