Thumbnails are now working

Displaying of thumbnails and storing in the database are now working.