title: Can't display image in flask/jinja2
body: <p>I am working on an assignment for a web application with flask, python and jinja2. Now I am trying to display an image on the page but it won't display.</p>
  <pre><code>&lt;img src=&quot;{{ url_for('static', filename='image/' + hottopic.image_name) }}&quot; alt=&quot;{{ hottopic.image_name }}&quot;&gt;
  </code></pre>
  <p>I can see the file name <code>alt=&quot;hottopic.image_name&quot;</code> on web page.</p>
  <pre><code>route.py
      @bp.route('/hot-topic', methods=['GET', 'POST'])
      def hottopic():
          page = request.args.get('page', 1, type=int)
          hottopics = HotTopic.query.order_by(HotTopic.id.desc()).paginate(
              page, current_app.config['POSTS_PER_PAGE'], False)
          image_names = os.listdir('static/image')
          return render_template('hot_topic.html', title=_('Hot topic'), hottopics=hottopics.items, image_names=image_names)
  </code></pre>
  <p>I tried to move the file to static</p>
  <pre><code>&lt;img src=&quot;{{ url_for('static', filename='test.jpg') }}&quot; alt=&quot;test.jpg&quot;&gt;
  </code></pre>
  <p>I even move it to the templates file with a simple html but it still doesn't work.</p>
  <pre><code>&lt;img src=&quot;test.jpg&quot; alt=&quot;&quot;&gt;
  </code></pre>
  <p>I checked the checkbox of &quot;show image&quot; in Internet Options, it was ticked.</p>