Matthew Sanford
Matthew Sanford

Reputation: 1099

Is there a way to embed an image inside a single Html (or even xml) document and have it displayed in the browser

I have a need to create a web based report for a custoomer, however, It must be only 1 document. Is there a way to add images so that they are not a separate file that the customer has to carry around?

Upvotes: 1

Views: 124

Answers (2)

Jay
Jay

Reputation: 6294

MS word support a format called MHTML which is a single file web page here

HTML5 is suppose to support embedding images in the html file, but support for that is limited.

Upvotes: 1

Quentin
Quentin

Reputation: 943214

The Data URI scheme, but this suffers from limited support in older versions of MSIE.

If the images are vectors, then you could use SVG or VML (depending on browser) to generate them. Raphaël provides a good, cross-browser way to do this with JS.

Upvotes: 3

Related Questions