including a graphic image in an extension - Mozilla

This is a discussion on including a graphic image in an extension - Mozilla ; I have an extension that inserts an img tag into the page's HTML. The img tag fetches a graphic image from my server. Sometimes, users of the extension get a broken image icon instead of the actual image. I'd like ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: including a graphic image in an extension

  1. including a graphic image in an extension

    I have an extension that inserts an img tag into the page's HTML. The img
    tag fetches a graphic image from my server. Sometimes, users of the
    extension get a broken image icon instead of the actual image.

    I'd like to include the graphic file inside the extension, but I don't know
    how to do it (or if it's possible).

    Can anyone point me to an existing extension that includes a graphic file
    and displays it in the page's HTML?

  2. Re: including a graphic image in an extension

    On Mon, 23 Jun 2008 10:28:13 -0700, Mike Wertheim wrote:

    > I have an extension that inserts an img tag into the page's HTML. The
    > img tag fetches a graphic image from my server. Sometimes, users of the
    > extension get a broken image icon instead of the actual image.
    >
    > I'd like to include the graphic file inside the extension, but I don't
    > know how to do it (or if it's possible).
    >
    > Can anyone point me to an existing extension that includes a graphic
    > file and displays it in the page's HTML?


    You could drop your image into one of the registered Chrome Providers[1] of
    your extension and use a Chrome URL[2] to link to your image. You could also
    use a data URI scheme[3] as shown in the HTML example[4].



    [1] Chrome Providers - http://developer.mozilla.org/en/docs...rome_Providers
    [2] XUL Tutorial:The Chrome URL - http://developer.mozilla.org/en/docs...The_Chrome_URL
    [3] data URI scheme - http://en.wikipedia.org/wiki/Data:_URI_scheme
    [4] HTML example - http://en.wikipedia.org/wiki/Data:_URI_scheme#HTML

    --
    Be excellent to each other. Party on, dudes. [Bill and Ted, 1989]

+ Reply to Thread