diff --git a/src/eog-image.c b/src/eog-image.c
index b11c8cb..bb37046 100644
--- a/src/eog-image.c
+++ b/src/eog-image.c
@@ -44,6 +44,7 @@
 
 #include <unistd.h>
 #include <string.h>
+#include <stdlib.h>
 
 #include <glib.h>
 #include <glib-object.h>
@@ -1903,6 +1904,17 @@ eog_image_save_by_info (EogImage *img, EogImageSaveInfo *source, GError **error)
 	}
 
 	if (success) {
+                /* check if the target is a symbilic link */
+                if (g_file_query_file_type(priv->file,
+                                           G_FILE_QUERY_INFO_NONE | G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS,
+                                           NULL) == G_FILE_TYPE_SYMBOLIC_LINK)
+                {
+
+                        char *real_path = realpath (g_file_get_path(priv->file), NULL);
+                        g_object_unref (priv->file);
+            	        priv->file = NULL;
+                        priv->file = g_file_new_for_path (real_path);
+                }
 		/* try to move result file to target uri */
 		success = tmp_file_move_to_uri (img, tmp_file, priv->file, TRUE /*overwrite*/, error);
 	}
