Fixed the bugs in imageapp, database added for images