added image functionality with database