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.
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:
- Serbian, by author himself
- Spanish, by Marcelo Pedra
- Persian, by Amir Nazhand
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.
40 thoughts on “Cache Images”
Great plugin and it worked great! See: http://wordpress.stackexchange.com/questions/3442/retrieving-and-storing-images-linked-from-other-domains-on-local-server/3473#3473 for my scenario
is not taken along
I think all generated ASP images … e.g. http://esbn.org/esbn/barcode.asp?code=8290006012274613253&height=20&width=1&mode=code39
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.
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.
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.
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.
does this also create thumbnails of the caches images?
Yes, it does. Its imported to media library as if image was uploaded regularly.
Thank you for your reply.
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:
I found out that this happens because when grabbing the image it gets translated to:
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
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.
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
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,
Problem remedied itself overnight…
Can this pluggin be tweeked to scan pages and not just posts?
It scans all post types.
Did you received the other post I made showing that the pluggin will not identify the links on that page?
Sorry, I didn’t in recent past and I can’t find anything from before.
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
Is there a way to prevent images from a certain domain from caching?
Not for now.
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.
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.
Wow, that is fantastic. Nice to see you paid attention to the details. Also, thanks for the timely follow up!
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?
Have you tried option shown on image above with caption Automatic caching settings?
Yes I have this checked – Automatically cache images on post’s saving
I am using the FeedWordpress to automaticaly make my posts .
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!!
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?
Ahaa! Amazing, I didn’t spot this!
Thanks Milan 🙂
This plugin works great.
Is it possible to also cache pdf, docx files and other attachments?
Tony, theoretically yes, but not with this plugin. Changes made on top of this plugin are not simple too because it was made for images.
Is there any chance of seeing an update for this? Namely that it fails to fetch images with a space in their name. Other than that it’s worked great.
Tony, I want to update but never find time for rewriting.
With the current (2017) no-hotlink action of PhotoBucket removing millions of photos of the internet, is there any ‘drive’ to update this plugin again?
If I would code this plugin now, it would be very different and I wouldn’t just update it. So it needs total rewrite that I never find time for…