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 7094075
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T08:31:07+00:00 2026-05-28T08:31:07+00:00

I am using express and I would like to serve a generated image. The

  • 0

I am using express and I would like to serve a generated image. The html source is something like <img src="/generated/image"> and the route setup so when a GET to /generated/image is called, a PNG gets created (and put, for example, in the public directory, but I guess this is not strictly necessary). Now I’d like to send back that image to the user. Should I use res.send() for that purpose? How can I get the data to the user?

  • 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-05-28T08:31:07+00:00Added an answer on May 28, 2026 at 8:31 am

    Depending on library you’re using to create the image, you should be able to res.end(image, 'binary'); Make sure to include the correct Content-Type header.

    If you don’t want to generate the file every time you can write the file to disk, store in a key/value store, relational database, etc… and check/serve if it has already been created before going through the creation routines.

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

Sidebar

Related Questions

I'm using Visual Studio 2008 Express and I would like Visual Studio (or perhaps
I am using L2S to access my MSSQL 2008 Express server. I would like
We are currently using SQL Server 2008 Express Edition, but would like to upgrade
When using SQL Server Express 2005's User Instance feature with a connection string like
I would like to write an HTTP server that answer to request using a
Is using SQL Express in a production environment a reasonable choice? I looked at
I'm using SQL Express 2008 edition. I've planned my database tables/relationships on a piece
I'm successfully using Paypal Express Checkout in a marketplace web app passing for every
I am developing a Silverlight app using VS2008 Express. I have just implemented a
I'm new to Visual C# Studio (actually using the Express edition, but another developer

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.