Index: /main/waeup.sirp/trunk/src/waeup/sirp/applicants/applicant.py
===================================================================
--- /main/waeup.sirp/trunk/src/waeup/sirp/applicants/applicant.py	(revision 7102)
+++ /main/waeup.sirp/trunk/src/waeup/sirp/applicants/applicant.py	(revision 7103)
@@ -146,5 +146,5 @@
         return name == self.chooseName()
 
-    def chooseName(self, name=None, attr=None):
+    def chooseName(self, name=None, attr=None, ext=None):
         """Get a valid file id for applicant context.
 
Index: /main/waeup.sirp/trunk/src/waeup/sirp/imagestorage.py
===================================================================
--- /main/waeup.sirp/trunk/src/waeup/sirp/imagestorage.py	(revision 7102)
+++ /main/waeup.sirp/trunk/src/waeup/sirp/imagestorage.py	(revision 7103)
@@ -223,5 +223,5 @@
         return False
 
-    def chooseName(self, name, attr=None):
+    def chooseName(self, name, attr=None, ext=None):
         """Choose a unique valid file id for the object.
 
@@ -233,6 +233,6 @@
 
         For this default name chooser we return the given name if it
-        is valid or ``unknown_file`` else. The `attr` param is not
-        taken into account here.
+        is valid or ``unknown_file`` else. The `attr` and the `ext` params
+        are not taken into account here.
         """
         if self.checkName(name):
@@ -344,5 +344,5 @@
         return fd
 
-    def getFileByContext(self, context, attr=None):
+    def getFileByContext(self, context, attr=None, ext=None):
         """Get a file for given context.
 
@@ -355,5 +355,5 @@
         id for the context and `attr` given.
 
-        Both, `context` and `attr` are used to find (`context`)
+        `context`, `attr` and `ext` are used to find (`context`)
         and feed (`attr`) an appropriate file name chooser.
 
@@ -364,5 +364,5 @@
                      :class:`DefaultFileStoreHandler`.
         """
-        file_id = IFileStoreNameChooser(context).chooseName(attr=attr)
+        file_id = IFileStoreNameChooser(context).chooseName(attr=attr, ext=ext)
         return self.getFile(file_id)
 
@@ -378,5 +378,5 @@
         return
 
-    def deleteFileByContext(self, context, attr=None):
+    def deleteFileByContext(self, context, attr=None, ext=None):
         """Remove file identified by `context` and `attr` if it exists.
 
@@ -385,5 +385,5 @@
         id for the context and `attr` given.
 
-        Both, `context` and `attr` are used to find (`context`)
+        `context`, `attr` and `ext` are used to find (`context`)
         and feed (`attr`) an appropriate file name chooser.
 
@@ -395,5 +395,5 @@
 
         """
-        file_id = IFileStoreNameChooser(context).chooseName(attr=attr)
+        file_id = IFileStoreNameChooser(context).chooseName(attr=attr, ext=ext)
         return self.deleteFile(file_id)
 
Index: /main/waeup.sirp/trunk/src/waeup/sirp/students/student.py
===================================================================
--- /main/waeup.sirp/trunk/src/waeup/sirp/students/student.py	(revision 7102)
+++ /main/waeup.sirp/trunk/src/waeup/sirp/students/student.py	(revision 7103)
@@ -177,5 +177,5 @@
         return name == self.chooseName()
 
-    def chooseName(self, name=None, attr=None):
+    def chooseName(self, name=None, attr=None, ext=u''):
         """Get a valid file id for student context.
 
@@ -195,8 +195,7 @@
 
         """
-        ext = u''
         if name and name.count('.') == 1:
             basename, ext = os.path.splitext(name)
-        ext.lower()
+            ext.lower()
         stud_id = self.context.student_id
         marked_filename = '__%s__%s/%s/%s_%s%s' % (
Index: /main/waeup.sirp/trunk/src/waeup/sirp/students/viewlets.py
===================================================================
--- /main/waeup.sirp/trunk/src/waeup/sirp/students/viewlets.py	(revision 7102)
+++ /main/waeup.sirp/trunk/src/waeup/sirp/students/viewlets.py	(revision 7103)
@@ -288,4 +288,5 @@
     grok.baseclass()
     attr = None
+    ext = u'.jpg'
 
     def render(self):
@@ -293,5 +294,5 @@
         # for file storage.
         image = getUtility(IExtFileStore).getFileByContext(
-            self.context, attr=self.attr)
+            self.context, attr=self.attr, ext=self.ext)
         self.response.setHeader(
             'Content-Type', 'image/jpeg')
@@ -306,2 +307,3 @@
     grok.name('birth_certificate.jpg')
     attr = u'birth_certificate'
+    ext = u'.jpg'
Index: /main/waeup.sirp/trunk/src/waeup/sirp/tests/test_imagestorage.py
===================================================================
--- /main/waeup.sirp/trunk/src/waeup/sirp/tests/test_imagestorage.py	(revision 7102)
+++ /main/waeup.sirp/trunk/src/waeup/sirp/tests/test_imagestorage.py	(revision 7103)
@@ -158,5 +158,5 @@
         self.context = context
 
-    def chooseName(self, name=None, attr=None):
+    def chooseName(self, name=None, attr=None, ext=None):
         # this name chooser returns different file ids depending on
         # the `attr` parameter, a simple string.
