Index: /trunk/src/org/openstreetmap/josm/io/MirroredInputStream.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/MirroredInputStream.java	(revision 1710)
+++ /trunk/src/org/openstreetmap/josm/io/MirroredInputStream.java	(revision 1711)
@@ -21,4 +21,5 @@
 public class MirroredInputStream extends InputStream {
     InputStream fs = null;
+    File file = null;
 
     public MirroredInputStream(String name) throws IOException {
@@ -30,7 +31,10 @@
     }
 
+    public MirroredInputStream(String name, String destDir) throws IOException {
+        this(name, destDir, -1L);
+    }
+
     public MirroredInputStream(String name, String destDir, long maxTime) throws IOException {
         URL url;
-        File file = null;
         try {
             url = new URL(name);
@@ -53,4 +57,9 @@
             throw new IOException();
         fs = new FileInputStream(file);
+    }
+
+    public File getFile()
+    {
+       return file;
     }
 
Index: /trunk/src/org/openstreetmap/josm/tools/ImageProvider.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/ImageProvider.java	(revision 1710)
+++ /trunk/src/org/openstreetmap/josm/tools/ImageProvider.java	(revision 1711)
@@ -15,4 +15,5 @@
 import java.awt.image.BufferedImage;
 import java.io.File;
+import java.io.IOException;
 import java.net.MalformedURLException;
 import java.net.URL;
@@ -28,4 +29,5 @@
 
 import org.openstreetmap.josm.Main;
+import org.openstreetmap.josm.io.MirroredInputStream;
 
 /**
@@ -85,4 +87,24 @@
         if (name == null)
             return null;
+        if (name.startsWith("http://"))
+        {
+            Image img = cache.get(name);
+            if(img == null)
+            {
+                try
+                {
+                    MirroredInputStream is = new MirroredInputStream(name,
+                    new File(Main.pref.getPreferencesDir(), "images").toString());
+                    if(is != null)
+                    {
+                      img = Toolkit.getDefaultToolkit().createImage(is.getFile().toURI().toURL());
+                      cache.put(name, img);
+                    }
+                }
+                catch(IOException e) {
+                }
+            }
+            return img == null ? null : new ImageIcon(img);
+        }
         if (subdir == null)
             subdir = "";
