title: python flask display image on a html page
body: <p>I am trying to pass a filename of an image and render it on a template,
  Although I am passing the actual name through it does not display on the page</p>
  
  <pre><code>@app.route('/', methods=['GET','POST'])
  @app.route('/start', methods=['GET','POST'])
  def start():
  person_to_show = 'tim'
  profilepic_filename = os.path.join(people_dir, person_to_show, "img.jpg")
  return render_template('start.html',profilepic_filename  =profilepic_filename )
  </code></pre>
  
  <p>For example: profilepic_filename = /data/tim/img.jpg
  I have tried</p>
  
  <pre><code>{{profilepic_filename}}
  &lt;img src="{{ url_for('data', filename='tim/img.jpg') }}"&gt;&lt;/img&gt;
  </code></pre>
  
  <p>And I have also tried</p>
  
  <pre><code>&lt;img src="{{profilepic_filename}}"&gt;&lt;/img&gt;
  </code></pre>
  
  <p>Neither of which worked</p>