get pictures from database