Index: trunk/src/org/openstreetmap/josm/data/imagery/street_level/IImageEntry.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/imagery/street_level/IImageEntry.java	(revision 18424)
+++ trunk/src/org/openstreetmap/josm/data/imagery/street_level/IImageEntry.java	(revision 18427)
@@ -6,4 +6,5 @@
 import java.io.File;
 import java.io.IOException;
+import java.net.URI;
 import java.time.Instant;
 import java.util.List;
@@ -158,4 +159,13 @@
 
     /**
+     * Get the URI for the image
+     * @return The image URI
+     * @since 18427
+     */
+    default URI getImageURI() {
+        return this.getFile().toURI();
+    }
+
+    /**
      * Returns the position value. The position value from the temporary copy
      * is returned if that copy exists.
Index: trunk/src/org/openstreetmap/josm/gui/layer/geoimage/ImageViewerDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/geoimage/ImageViewerDialog.java	(revision 18424)
+++ trunk/src/org/openstreetmap/josm/gui/layer/geoimage/ImageViewerDialog.java	(revision 18427)
@@ -484,5 +484,5 @@
         public void actionPerformed(ActionEvent e) {
             if (currentEntry != null) {
-                ClipboardUtils.copyString(String.valueOf(currentEntry.getFile()));
+                ClipboardUtils.copyString(String.valueOf(currentEntry.getImageURI()));
             }
         }
@@ -511,5 +511,5 @@
             if (currentEntry != null) {
                 try {
-                    PlatformManager.getPlatform().openUrl(currentEntry.getFile().toURI().toURL().toExternalForm());
+                    PlatformManager.getPlatform().openUrl(currentEntry.getImageURI().toURL().toExternalForm());
                 } catch (IOException ex) {
                     Logging.error(ex);
Index: trunk/src/org/openstreetmap/josm/gui/layer/geoimage/WikimediaCommonsEntry.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/geoimage/WikimediaCommonsEntry.java	(revision 18424)
+++ trunk/src/org/openstreetmap/josm/gui/layer/geoimage/WikimediaCommonsEntry.java	(revision 18427)
@@ -3,8 +3,11 @@
 
 import java.net.MalformedURLException;
+import java.net.URI;
+import java.net.URISyntaxException;
 import java.net.URL;
 import java.util.Objects;
 
 import org.openstreetmap.josm.data.coor.LatLon;
+import org.openstreetmap.josm.tools.JosmRuntimeException;
 import org.openstreetmap.josm.tools.Mediawiki;
 
@@ -23,4 +26,14 @@
     protected URL getImageUrl() throws MalformedURLException {
         return new URL(Mediawiki.getImageUrl("https://upload.wikimedia.org/wikipedia/commons", title));
+    }
+
+    @Override
+    public URI getImageURI() {
+        try {
+            return new URI(Mediawiki.getImageUrl("https://upload.wikimedia.org/wikipedia/commons", this.title));
+        } catch (URISyntaxException e) {
+            // This should never happen.
+            throw new JosmRuntimeException(this.toString(), e);
+        }
     }
 
