Index: /WAeUP_SRP/base/WAeUPTool.py
===================================================================
--- /WAeUP_SRP/base/WAeUPTool.py	(revision 2674)
+++ /WAeUP_SRP/base/WAeUPTool.py	(revision 2675)
@@ -54,4 +54,6 @@
 images_base = os.path.join(i_home,"images")
 
+def getImagesDir(student_id):
+    return os.path.join("%s" % images_base,student_id[0],student_id)
 
 def getObject(object,name):
@@ -468,4 +470,5 @@
     ###)
 
+
     security.declarePublic('loadStudentFoto') ###(
     def loadStudentFoto(self,student,filename,folder):
@@ -474,5 +477,5 @@
         picture ="%s/import/%s/%s" % (i_home,folder,filename)
         student_id = student.getId()
-        images_dir = os.path.join("%s" % images_base,student_id)
+        images_dir = getImagesDir(student_id)
         if not os.path.exists(images_dir):
             os.mkdir(images_dir)
@@ -847,5 +850,9 @@
                                                               brain.screening_type,
                                                               brain.reg_no)
-        images_dir = os.path.join("%s" % images_base,student_id)
+        images_dir = getImagesDir(student_id)
+        #images_dir = os.path.join("%s" % images_base,student_id)
+        letter_dir,student_dir = os.path.split(images_dir)
+        if not os.path.exists(letter_dir):
+            os.mkdir(letter_dir)
         if not os.path.exists(images_dir):
             os.mkdir(images_dir)
@@ -946,5 +953,6 @@
         if student_id is None:
             return False
-        picture_path = os.path.join(images_base,student_id)
+        picture_path = getImagesDir(student_id)
+        #picture_path = os.path.join(images_base,student_id)
         if not os.path.exists(picture_path):
             return False
@@ -967,5 +975,6 @@
     def showFsPicture(self,path):
         """return a picture from the filesystem"""
-        picture_path = os.path.join(i_home,path)
+        #picture_path = os.path.join(i_home,path)
+        picture_path = os.path.join(images_base,path)
         response = self.REQUEST.RESPONSE
         #import pdb;pdb.set_trace()
@@ -1851,5 +1860,6 @@
     def moveImagesToFS(self,student_id="O738726"):
         "move the images to the filesystem"
-        images_dir = os.path.join("%s" % images_base,student_id)
+        images_dir = getImagesDir(student_id)
+        #images_dir = os.path.join("%s" % images_base,student_id)
         student_folder = getattr(self.portal_url.getPortalObject().campus.students,student_id)
         stool = getToolByName(self, 'portal_schemas')
Index: /WAeUP_SRP/base/Widgets.py
===================================================================
--- /WAeUP_SRP/base/Widgets.py	(revision 2674)
+++ /WAeUP_SRP/base/Widgets.py	(revision 2675)
@@ -21,4 +21,5 @@
 from Products.WAeUP_SRP.Students import getStudentByRegNo
 from Products.WAeUP_SRP.Academics import makeCertificateCode
+from Products.WAeUP_SRP.WAeUPTool import getImagesDir
 #from Products.ExtFile.ExtFile import ExtFile
 import logging,os,re
@@ -1804,5 +1805,5 @@
     )
     path = "images"
-    storage_path = "%s/%s" % (i_home,path)
+    #storage_path = "%s/%s" % (i_home,path)
     id_field = ""
     show_image = False
@@ -1814,6 +1815,7 @@
         else:
             student_id = datastructure[self.id_field]
-        student_path = os.path.join(self.storage_path,
-                                    student_id)
+        # student_path = os.path.join(self.storage_path,
+        #                             student_id)
+        student_path = getImagesDir(student_id)
         image_name = ''
         content_url = ''
@@ -1827,13 +1829,10 @@
             info['image_name'] = image_name
             info['content_url'] = os.path.join(self.portal_url(),
-                                   "viewimage",
-                                   self.path,
-                                   student_id,
-                                   image_name,
-                                   )
-            info['current_filename'] = os.path.join(student_id,
-                                                    image_name)
-            info['file_path'] = os.path.join(self.storage_path,
-                                             info['current_filename'])
+                                               "viewimage",
+                                               student_id,
+                                               image_name,
+                                              )
+            info['current_filename'] =  image_name
+            info['file_path'] = os.path.join(student_path, image_name)
         return info
 
@@ -1945,5 +1944,7 @@
             student_id = datastructure[self.id_field]
         if student_id is not None:
-            student_path = os.path.join(self.storage_path,student_id)
+            # student_path = os.path.join(self.storage_path,
+            #                             student_id)
+            student_path = getImagesDir(student_id)
             if not os.path.exists(student_path):
                 self.waeup_tool.moveImagesToFS(student_id)
@@ -2038,5 +2039,6 @@
                 file.content_type = mimetype
             # Store the file in the filesystem
-            student_path = os.path.join(self.storage_path,student_id)
+            #student_path = os.path.join(self.storage_path,student_id)
+            student_path = getImagesDir(student_id)
             if not os.path.exists(student_path):
                 os.mkdir(student_path)
Index: /WAeUP_SRP/base/skins/waeup_utilities/viewimage.py
===================================================================
--- /WAeUP_SRP/base/skins/waeup_utilities/viewimage.py	(revision 2674)
+++ /WAeUP_SRP/base/skins/waeup_utilities/viewimage.py	(revision 2675)
@@ -17,5 +17,8 @@
         pass
 if path is None and traverse_subpath:
+    traverse_subpath.insert(0,traverse_subpath[0][0])
     path = "/".join(traverse_subpath)
+        
+#set_trace()
 return context.waeup_tool.showFsPicture(path)
 #import logging
