transition flask images to using url_for