diff --git a/src/plugins/NarrativeWeb.py b/src/plugins/NarrativeWeb.py
index ad4b25c8d..00bf23dd1 100644
--- a/src/plugins/NarrativeWeb.py
+++ b/src/plugins/NarrativeWeb.py
@@ -577,9 +577,12 @@ class BasePage:
of.write('\t
\n')
of.write('\t\t
%s
\n' % _('Gallery'))
+ displayed = []
for mediaref in photolist:
photo_handle = mediaref.get_reference_handle()
photo = db.get_object_from_handle(photo_handle)
+ if photo_handle in displayed:
+ continue
mime_type = photo.get_mime_type()
title = photo.get_description()
if title == "":
@@ -603,6 +606,7 @@ class BasePage:
self.photo_list[photo_handle] = [lnk]
except (IOError,OSError),msg:
WarningDialog(_("Could not add photo to page"),str(msg))
+ displayed.append(photo_handle)
of.write('\t\t
\n')
of.write('\t
\n\n')