Index: src/dlg-photo-importer.c
===================================================================
--- src/dlg-photo-importer.c	(revision 1273)
+++ src/dlg-photo-importer.c	(working copy)
@@ -746,7 +746,7 @@
 		int        width, height;
 		FileData  *fdata;
 
-		pixbuf = gdk_pixbuf_new_from_file (tmp_filename, NULL);
+		pixbuf = gth_pixbuf_new_from_uri (tmp_filename, NULL);
 		if (pixbuf == NULL)
 			pixbuf = get_mime_type_icon (data, camera_filename);
 
@@ -1866,8 +1866,8 @@
 
 	/* Set widgets data. */
 
-	data->camera_present_pixbuf = gdk_pixbuf_new_from_file (GTHUMB_GLADEDIR "/" CAMERA_FILE, NULL);
-	mute_pixbuf = gdk_pixbuf_new_from_file (GTHUMB_GLADEDIR "/" MUTE_FILE, NULL);
+	data->camera_present_pixbuf = gth_pixbuf_new_from_uri (GTHUMB_GLADEDIR "/" CAMERA_FILE, NULL);
+	mute_pixbuf = gth_pixbuf_new_from_uri (GTHUMB_GLADEDIR "/" MUTE_FILE, NULL);
 
 	data->no_camera_pixbuf = gdk_pixbuf_copy (data->camera_present_pixbuf);
 	gdk_pixbuf_composite (mute_pixbuf,
Index: src/rotation-utils.c
===================================================================
--- src/rotation-utils.c	(revision 1273)
+++ src/rotation-utils.c	(working copy)
@@ -217,7 +217,7 @@
 	if (transform == GTH_TRANSFORM_NONE)
 		return;
 
-	pixbuf1 = gdk_pixbuf_new_from_file (path, NULL);
+	pixbuf1 = gth_pixbuf_new_from_uri (path, NULL);
 	if (pixbuf1 == NULL)
 		return;
 
Index: src/dlg-web-exporter.c
===================================================================
--- src/dlg-web-exporter.c	(revision 1273)
+++ src/dlg-web-exporter.c	(working copy)
@@ -939,7 +939,7 @@
 					       "preview.png", 
 					       NULL);
 		if (path_is_file (filename)) {
-			GdkPixbuf *image = gdk_pixbuf_new_from_file (filename, NULL);
+			GdkPixbuf *image = gth_pixbuf_new_from_uri (filename, NULL);
 			int        w = gdk_pixbuf_get_width (image);
 			int        h = gdk_pixbuf_get_height (image);
 			if (scale_keepping_ratio (&w, &h, MAX_PREVIEW_SIZE, MAX_PREVIEW_SIZE)) {
Index: libgthumb/gtk-utils.c
===================================================================
--- libgthumb/gtk-utils.c	(revision 1273)
+++ libgthumb/gtk-utils.c	(working copy)
@@ -787,7 +787,7 @@
 	if (icon_path == NULL)
 		return NULL;
 
-	pixbuf = gdk_pixbuf_new_from_file (icon_path, NULL);
+	pixbuf = gth_pixbuf_new_from_uri (icon_path, NULL);
         g_free (icon_path);
 	
         if (pixbuf == NULL)
Index: libgthumb/jpeg-utils.c
===================================================================
--- libgthumb/jpeg-utils.c	(revision 1273)
+++ libgthumb/jpeg-utils.c	(working copy)
@@ -191,8 +191,6 @@
 	GnomeVFSResult result;
 	unsigned int i;
 
-	path = remove_scheme_from_uri (path);
-	g_return_val_if_fail (g_path_is_absolute (path), NULL);
 
 	if (original_width_return != NULL)
 		*original_width_return = 0;
Index: libgthumb/image-loader.c
===================================================================
--- libgthumb/image-loader.c	(revision 1273)
+++ libgthumb/image-loader.c	(working copy)
@@ -605,10 +605,10 @@
 				animation = (*priv->loader) (path, &error, priv->loader_data);
 			else {
 				if (image_is_gif__accurate (path))
-					animation = gdk_pixbuf_animation_new_from_file (path, &error);
+					animation = gth_pixbuf_animation_new_from_uri (path, &error);
 				else {
 					GdkPixbuf *pixbuf;
-					pixbuf = gdk_pixbuf_new_from_file (path, &error);
+					pixbuf = gth_pixbuf_new_from_uri (path, &error);
 					if (pixbuf != NULL) {
 						animation = gdk_pixbuf_non_anim_new (pixbuf);
 						g_object_unref (pixbuf);
@@ -1014,7 +1014,7 @@
 
 	uri = gnome_vfs_uri_dup (priv->uri);
 
-        path = gnome_vfs_uri_to_string (uri, GNOME_VFS_URI_HIDE_TOPLEVEL_METHOD);
+        path = gnome_vfs_uri_to_string (uri, GNOME_VFS_URI_HIDE_NONE);
         esc_path = gnome_vfs_unescape_string (path, NULL);
         g_free (path);
 	gnome_vfs_uri_unref (uri);
Index: libgthumb/file-utils.c
===================================================================
--- libgthumb/file-utils.c	(revision 1273)
+++ libgthumb/file-utils.c	(working copy)
@@ -37,6 +37,8 @@
 
 #include <glib.h>
 #include <glib/gi18n.h>
+#include <gdk-pixbuf/gdk-pixbuf-animation.h>
+#include <libgnomeui/gnome-vfs-util.h>
 #include <libgnomevfs/gnome-vfs.h>
 #include <libgnomevfs/gnome-vfs-handle.h>
 #include <libgnomevfs/gnome-vfs-mime.h>
@@ -48,8 +50,8 @@
 #include "glib-utils.h"
 #include "gconf-utils.h"
 #include "file-utils.h"
+#include "pixbuf-utils.h"
 
-
 #define BUF_SIZE 4096
 #define CHUNK_SIZE 128
 #define MAX_SYMLINKS_FOLLOWED 32
@@ -1508,7 +1510,7 @@
 	my_text_uri = g_strdup (text_uri);
 	info = gnome_vfs_file_info_new ();
 
-	for (p = my_text_uri; (p != NULL) && (*p != 0); ) {
+	for (p = remove_scheme_from_uri(my_text_uri); (p != NULL) && (*p != 0); ) {
 		char           *new_text_uri;
 		GnomeVFSURI    *new_uri;
 
@@ -2097,3 +2099,28 @@
 
 	return TRUE;
 }
+
+
+/* Pixbuf + VFS */
+
+GdkPixbuf*
+gth_pixbuf_new_from_uri (const char *filename, GError **error)
+{
+	/* Very temporary - borrow code from libgnomeui directly, since
+	   libgnomeui is or will be deprecated. See bug 143197. */
+
+	if (!(uri_has_scheme(filename)) || uri_scheme_is_file(filename)) {
+		return gdk_pixbuf_new_from_file (remove_scheme_from_uri(filename), error);
+	} 
+	else {
+		return gnome_gdk_pixbuf_new_from_uri(filename);
+	}
+}
+
+
+GdkPixbufAnimation*
+gth_pixbuf_animation_new_from_uri (const char *filename, GError **error)
+{
+	/* Needs to be converted to VFS-compatible form, as part of bug 143197. */
+	return gdk_pixbuf_animation_new_from_file (filename, error);
+}
Index: libgthumb/file-utils.h
===================================================================
--- libgthumb/file-utils.h	(revision 1273)
+++ libgthumb/file-utils.h	(working copy)
@@ -31,6 +31,7 @@
 #include <libgnomevfs/gnome-vfs-file-size.h>
 #include <libgnomevfs/gnome-vfs-async-ops.h>
 #include <libgnomevfs/gnome-vfs-mime-handlers.h>
+#include <gdk-pixbuf/gdk-pixbuf.h>
 #include "typedefs.h"
 
 #define SPECIAL_DIR(x) (! strcmp (x, "..") || ! strcmp (x, "."))
@@ -205,4 +206,10 @@
 gboolean            check_permissions             (const char       *path, 
 						   int               mode);
 
+/* Pixbuf + VFS */
+GdkPixbuf*	    gth_pixbuf_new_from_uri	      (const char   *filename, 
+						       GError 	   **error);
+GdkPixbufAnimation* gth_pixbuf_animation_new_from_uri (const char   *filename, 
+						       GError      **error);
+
 #endif /* FILE_UTILS_H */
Index: libgthumb/thumb-loader.c
===================================================================
--- libgthumb/thumb-loader.c	(revision 1273)
+++ libgthumb/thumb-loader.c	(working copy)
@@ -259,10 +259,10 @@
 	} else
 		{
 			if (image_is_gif (path))
-				animation = gdk_pixbuf_animation_new_from_file (path, error);
+				animation = gth_pixbuf_animation_new_from_uri (path, error);
 			else {
 				GdkPixbuf *pixbuf;
-				pixbuf = gdk_pixbuf_new_from_file (path, error);
+				pixbuf = gth_pixbuf_new_from_uri (path, error);
 				if (pixbuf != NULL) {
 					animation = gdk_pixbuf_non_anim_new (pixbuf);
 					g_object_unref (pixbuf);
@@ -374,8 +374,7 @@
 
 	tl->priv->uri = get_uri_from_path (path);
 	tl->priv->e_uri = gnome_vfs_escape_host_and_path_string (tl->priv->uri);
-
-	image_loader_set_path (tl->priv->il, remove_scheme_from_uri (tl->priv->uri));
+	image_loader_set_path (tl->priv->il, tl->priv->uri);
 }
 
 
@@ -432,7 +431,7 @@
 	if (tl->priv->uri == NULL)
 		return NULL;
 
-	return g_strdup (remove_scheme_from_uri (tl->priv->uri));
+	return g_strdup (tl->priv->uri);
 }
 
 
@@ -475,7 +474,7 @@
 
 	} else {
 		priv->from_cache = FALSE;
-		image_loader_set_path (priv->il, remove_scheme_from_uri (priv->uri));
+		image_loader_set_path (priv->il, priv->uri);
 
 		/* Check file dimensions. */
 
@@ -696,7 +695,7 @@
 	priv->from_cache = FALSE;
 	g_warning ("Thumbnail image in cache failed to load, trying to recreate.");
 
-	image_loader_set_path (priv->il, remove_scheme_from_uri (priv->uri));
+	image_loader_set_path (priv->il, priv->uri);
 	image_loader_start (priv->il);
 }
 
Index: libgthumb/print-callbacks.c
===================================================================
--- libgthumb/print-callbacks.c	(revision 1273)
+++ libgthumb/print-callbacks.c	(working copy)
@@ -1539,7 +1539,7 @@
 			cairo_restore (cr);
 		}
 
-		image_pixbuf = gdk_pixbuf_new_from_file (image->filename, NULL);
+		image_pixbuf = gth_pixbuf_new_from_uri (image->filename, NULL);
 
 		pixbuf = print__gdk_pixbuf_rotate (image_pixbuf, image->rotate);
 		g_object_unref (image_pixbuf);
