gallery display with upload photo not working