title: Accessing image from Cloud Storage
body: <p>I'm pretty new to python and Google Cloud. I'm developing a website that needs to retrieve image from Cloud Storage and serve it to HTML. I deploy my Flask on App Engine and the image is can't be served it.</p>
  <p>My Flask code looks like this:</p>
  <pre><code>@app.route('/translate')
  def translate():
      return render_template(&quot;translate.html&quot;)
  
  @app.route('/get-image', methods=['GET', 'POST'])
  def get_image():
      if request.method == 'POST':
          name = request.form.get(&quot;huruf&quot;)
          filepath = name + &quot;.png&quot;
          buc = storage_client.get_bucket(CLOUD_STORAGE_BUCKET)
          blob = buc.blob(filepath)
          filename = blob.download_to_filename(filepath)
          return render_template(&quot;get-translate.html&quot;, nama=name, pict=filename)
      else:
          return redirect(url_for(translate))
  </code></pre>
  <p>Here is my HTML that input request:</p>
  <pre><code>{% extends &quot;base.html&quot; %}
  
  {% block title %} Get Image - Isyaratku {% endblock %}
  
  {% block content %} 
  &lt;br&gt;
  &lt;form action=&quot;/get-image&quot; method=&quot;post&quot;&gt;
      &lt;label for=&quot;huruf&quot;&gt;Huruf :&lt;/label&gt;
      &lt;input type=&quot;text&quot; name=&quot;huruf&quot;&gt;
      &lt;br&gt;
      &lt;input type=&quot;submit&quot; value=&quot;SUBMIT&quot;&gt;
  &lt;/form&gt;
  
  {% endblock %}
  </code></pre>
  <p>And here is my HTML for a received image from Cloud Storage:</p>
  <pre><code>{% extends &quot;base.html&quot; %}
  
  {% block title %} Get Translate - Isyaratku {% endblock %}
  
  {% block content %} 
  
  &lt;h1&gt;{{ nama }}&lt;/h1&gt;
  
  &lt;img src=&quot;{{ pict }}&quot; alt=&quot;gmb&quot;&gt;
  
  {% endblock %}
  </code></pre>