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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T19:25:40+00:00 2026-05-27T19:25:40+00:00

What I have is a static website that should provide displaying a local image

  • 0

What I have is a static website that should provide displaying a local image from the user’s computer. This website has no real backend, it is only hosted on a static fileserver. Also the image hasn’t to be processed on the server, all processing is made on the client’s machine from the website itself.

What I’ve tried:

  1. Use local path.
    Problem: Cross origin policy, if the website is hosted under “www.mywebsite.com”, no static files are supported in the browser.

  2. Use the imageshack.us API for uploading in an iframe, then get back the images’ url.
    Problem: Cross origin policy, the iframe mustn’t transfer information to it’s parent if it’s content isn’t on the same domain.

Do you have any ideas how to solve this problem?

Thanks

  • 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-27T19:25:41+00:00Added an answer on May 27, 2026 at 7:25 pm

    You could use the FileReader API’s readAsDataURL and use the returned data URL to display the image. MDN’s page has an example, that does just this, and you can see it working here.

    Note that the FileReader API is relatively new, and there is no support for it in IE <10. Browser Support

    Demo of MDN’s code

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

Sidebar

Related Questions

I have a Website model, that has a @Required User owner property. This property
I have a website that right now, runs by creating static html pages from
I have an existing website running on IIS6 that has only static HTML pages.
I have a website that has a combination of Wordpress static pages and posts,
I'm having trouble with caching on my website. I have static files that should
I have some static images in a folder on my IIS 6-based website that
Suppose I have static ip in a subnet that has DHCP server. If i
I'm developing a website that has some audio courses, each course can have multiple
Lets say you have website that keeps balance for each user. You give each
I have downloaded LEDA free edition from this website http://www.algorithmic-solutions.com/leda/ledak/index.htm First quetion: I want

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.