title: Flask url_for - incorrect static folder path
body: <p>I'm trying to add an image to my quiz.html page with Flask using:</p>
  
  <pre><code>&lt;img src='{{url_for('static', filename='img/question-mark.png')}}' alt='' &gt;
  </code></pre>
  
  <p>When I look at the page source, it's interpreted as:
  <code>http://127.0.0.1:5000/quiz/static/img/question-mark.png</code> rather than:
  <br /><code>http://127.0.0.1:5000/static/img/question-mark.png</code></p>
  
  <p>Yet, my <code>.css</code> files and <code>.js</code> files load in <code>quiz.html</code> using the same syntax just fine. How can I get the correct static file path?</p>
  
  <p>My current structure is:</p>
  
  <pre><code> |-app.py
   |-templates/
     |-main.html
     |-quiz.html
   |-static/
     |-css/
     |-img/
  </code></pre>
  
  <p>app.py </p>
  
  <pre><code>from flask import Flask, render_template
  
  app = Flask(__name__)
  
  @app.route('/')
  def homepage():
      return render_template("main.html")
  
  @app.route('/quiz/')
  def quiz():
      return render_template("quiz.html")
  
  if __name__=="__main__":
      app.run(debug=True)
  </code></pre>