add a function of picture display in main page