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

  • SEARCH
  • Home
  • 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 8727265
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T08:24:19+00:00 2026-06-13T08:24:19+00:00

I have an app where the user can upload an image from disk. That

  • 0

I have an app where the user can upload an image from disk. That image
will be shown in every page of the application as long as the user is logged.

This is the portion of the template that loads an image to the page:

{% if currentService.image %}
    <img src='img?img_id={{ currentService.key() }}'></img>
{% else %}
    <img src='static/no_image.jpeg' />
{% endif %}

This is how I make the redirect in the controller:

def main():
    app = webapp2.WSGIApplication([
                                   ('/img', ImageHandler),
                                   ('/.*', MainPage)
                                   ],debug=True)
    wsgiref.handlers.CGIHandler().run(app)

and this is the corresponding handler class:

class ImageHandler(webapp2.RequestHandler):
    def get(self):
        try:
            rsRequest = db.get(self.request.get("img_id"))
            if rsRequest.image:
                self.response.headers['Content-Type'] = "image/png"
                self.response.out.write(str(rsRequest.image))
            else:
                self.response.out.write("No Image")
        except:
            tb = traceback.format_exc()
            ErrorLog(descripcion = str(tb)).put()
            self.doRender('error_page.html', {'mensaje':tb})

This is the model class:

class Service(db.Model):
    name = db.StringProperty(required = True)
    image = db.BlobProperty()

Everything works fine. The image is always loaded successfully.

But when I test my app in production the image loads very slow, progressively.

I don’t know what I’m doing wrong since the image loads fast (like a cached image) in development when I test the app in localhost.

What should I do to avoid that slow image load?

  • 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-13T08:24:20+00:00Added an answer on June 13, 2026 at 8:24 am

    Try serving your images from Blobstore, which is designed to serve big static payloads quickly. It’s probably fast on your local host because dev_appserver keeps the datastore in memory, but in production it’s much slower.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Java Google App Engine web application that allows user upload of
I have an app that can open up some other forms at the user's
I have an app that lets the user interact with several forms. I can
In my iOS app I have several UIElement s that can process user input:
I'm building an app where each user can have multiple profiles. Users can upload
I have a user-uploaded image pulled from the database that I am resizing smaller
I have a java application that will take the image as an input and
I have a web-app that allows users to upload and download image files by
We have a web application that allows users to upload photos which will then
I have a requirement in which the user can select an image from camera

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.