Make sure there's at least one image in the db, fix the add image code