displaying an image as html?

Discussion in 'HTML & Website Design' started by sawz, Nov 16, 2006.

  1. #1
    yeah, sounds strange, to me anyway. a friend mentioned that a client wanted to display a jpg image as html. well i said you could put an image tag into an html document and call it that way and he said no, the client says you can call it as html. so i says just call up the image, straight up. and he says no..lol....the client says it can be called up as html.

    so what am i missing here or is the client an idiot?
     
    sawz, Nov 16, 2006 IP
  2. SoKickIt

    SoKickIt Active Member

    Messages:
    305
    Likes Received:
    30
    Best Answers:
    0
    Trophy Points:
    70
    #2
    Maybe he's talking about mod_rewrite. I doubt, but it's possible.
     
    SoKickIt, Nov 16, 2006 IP
  3. crazybjörn

    crazybjörn Peon

    Messages:
    270
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    0
    #3
    There are actually two ways of embeding images into the html itself, though why he'd want to do that, no idea.

    First method: <img src="data:image/gif;base64,[...]"> which is basically the image encoded inline as base64 content.

    Second method: javascript:'GIF89a\1\0\1\0\200[...]\1\0;' This uses a javascript url to supply the value for the src= attribute of an IMG element.

    Do note that both methods are flakey and should really be avoided.


    edit: very confusing post, does he want to embed the image in html, or does he want to display a jpg image for example when an html pages is called up?
     
    crazybjörn, Nov 16, 2006 IP
    AdamSee likes this.
  4. Dio

    Dio Well-Known Member

    Messages:
    725
    Likes Received:
    55
    Best Answers:
    0
    Trophy Points:
    120
    #4
    Maybe the just mean the file path, and are using html as a catch all for just seeing a jpg as a page: site.com/images/image.jpg ?
     
    Dio, Nov 16, 2006 IP
  5. sawz

    sawz Prominent Member

    Messages:
    8,225
    Likes Received:
    808
    Best Answers:
    0
    Trophy Points:
    360
    #5
    that was one of my suggestions, but no, thanks for all who posted. maybe someone else has another idea. i'll forward this thread to my friend.
     
    sawz, Nov 16, 2006 IP