Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8938875
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T10:43:43+00:00 2026-06-15T10:43:43+00:00

I am having trouble using images, html files and javascript with Google App Engine.

  • 0

I am having trouble using images, html files and javascript with Google App Engine. I have a folder in my application folder called static. In the static folder I have 3 other folders called ‘images’, ‘html’, and ‘javascript’. My handlers part of my app.yaml is as follows,

handlers:
- url: /html
  static_dir: static/html

- url: /javascript
  static_dir: static/javascript

- url: /images
  static_dir: static/images

- url: /.*
  script: index.app

I try to access an image with,

self.response.out.write('<img src="images/image.png">')

and I render an html using jinja2 with,

jinja_environment = jinja2.Environment(autoescape=True,
                    loader=jinja2.FileSystemLoader(os.path.join(os.path.dirname(__file__), 'html')))

template = jinja_environment.get_template('index.html')
self.response.out.write(template.render(template_values))

I am getting an error that the template for jinja could not be found and my image is also not found. I thought this was the correct way to use upload and use files with Google App Engine but obviously I am wrong.

What is the proper way that I can use files in folders with Google App Engine?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T10:43:44+00:00Added an answer on June 15, 2026 at 10:43 am

    Using Jinja, you render a template which writes HTML. That is not static serving.

    And in your app.yaml you use: static/images or static/html
    But in your code you use another path!! Without the static folder.

    So if you have a folder static and in that folder you have a folder image:

    self.response.out.write('<img src="/images/image.png">')
    

    And your loader:

    jinja_environment = jinja2.Environment(autoescape=True,
                        loader=jinja2.FileSystemLoader(os.path.join(os.path.dirname(__file__),'static', 'html')))
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am having trouble using JQuery with ASP.net. I have a HTML img ,
I've been having trouble properly outputting the directory for images in a slider using
I'm using jquery masonry and having trouble getting images/posts to stack properly (see attached
I'm having some trouble with a fluid layout (with images using max-width:100%) in Internet
I'm having trouble using Google's freebase API in my java code. As it appears,
i'm having trouble using jwplayer events to work. i have jwplayer 5.7.1896 (Licensed version)
I'm having trouble roating an image around itself using Canvas. Since you can't rotate
I'm having trouble loading image data into a draggable window using EXT JS. The
Anybody having trouble using AVFoundation with GC ON??? What I am experiencing is that
I am having trouble using the //TODO flag. When I put the //TODO comment

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.