• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Including images directly in HTML files

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi there,
I've got the following question:
Usually placing an image in a HTML file is done by
<img SRC="myPicture.jpg">
or
<OBJECT type="image/jpg" data="myPicture.jpg">
</OBJECT>
But this means that there is an external file that contains the image, in this case myPicture.jpg
I don't want to have an additional external file that is referenced from within the HTML file. How can I manage to have the image be included directly in the HTML file itself?
I.e. when sending an e-mail in html format then the pictures are included in the same html file.
Ruediger
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No can do. HTML just doesn't do that.
E-mail messages that seem to "embed" images in HTML actually do no such thing. Rather, they are multi-part messages where the HTML is included in one part, and any "embedded" images are stored in other parts. The mail client peices it all together for display.
hth,
bear
 
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
XML includes the ability to embed binary data, so in theory it may be possible in XHTML, but I really doubt that anyone has bothered to implement anything like this in the clients.
Like Bear says, HTML just doesn't do that.
Dave
 
PI day is 3.14 (march 14th) and is also einstein's birthday. And this is merely a tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic