title: Rotated picture is not displayed in flask
body: <p>The original pictures are uploaded and store in a directory, after it it displayed in a html page. the route is</p>
  
  <pre><code>@mod.route('/profile', methods=['GET'])
  @login_required
  def profile():
      form = UpdateProfileForm()
      if request.method == 'GET':
          form.username.data = current_user.username
          form.country.data = Paises.query.all()
          form.telephone.data = current_user.telephone
      image_file = url_for('static', filename='profile_pics/' + current_user.image_file)
      return render_template('profile.html', form=form, image_file=image_file)
  
  </code></pre>
  
  <p>it display the picture in the webpage when a button for turning 90 degrees reside. the picture below shows the picture in directory too</p>
  
  <p><a href="https://i.stack.imgur.com/H5iHS.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/H5iHS.jpg" alt="enter image description here"></a></p>
  
  <p>The button for turning the picture call the route and function is</p>
  
  <pre><code>    path = 'static/profile_pics/'+filename
      i = Image.open(path)
      y, z = i.size
      i2 = i.rotate(90, expand=1)
      i2.save(path)
  </code></pre>
  
  <p>The problem is while in file explorer the picture is properly turn it, in flask webpage it still loading as original.</p>
  
  <p><a href="https://i.stack.imgur.com/yCdcg.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yCdcg.jpg" alt="enter image description here"></a></p>
  
  <p>thanks for your help with it</p>