Hiding the Image Toolbar in IE


If you’ve spent any time browsing the Internet with Internet Explorer, you’ve seen the little toolbar that IE displays over larger images.  Today’s tip, contributed by Larry Anderson, explains how to hide this little bugger.

In Internet Explorer 6.0, when a picture larger than 130×130 is displayed, IE displays the image toolbar (save, print, etc.). Sometimes the image toolbar can make a page look a little ‘funky’ and disabling it along with using a script to block right clicks can cut down on ‘picture stealing’ from your site.

You can make your page not display the image toolbar on an image-by-image basis by adding GALLERYIMG=”no” to the <IMG> tag, as shown in the following code example:

<IMG SRC="mypicture.jpg" HEIGHT="100px" WIDTH="100px" GALLERYIMG="no">

Or you can disable the display of the image toolbar for an entire Web page by setting the HTTP-EQUIV and CONTENT attributes of the META element. Set HTTP-EQUIV=”imagetoolbar” and CONTENT=”no”. Just put the following code in the HEAD section of your page, and IE doesn’t display the image toolbar for any image in the page.

<META HTTP-EQUIV="imagetoolbar" CONTENT="no">

This is a great tip.  I truly detest this toolbar because it just plain messes up the look of a page, so IMHO, hiding it is a great idea. Just one thing I want to add is that hiding the image toolbar and disabling right click on a Web page doesn’t provide true security for images and other copyrighted artwork.  At best, it slows people down. (For more information, see my post Securing online content and images.)

Comments (9)

  1. Martin Alderson says:

    Good to see MS using proper XHTML… not…

    Comon, why does MS need to insert _yet more_ stuff into HTML, that is IE specific.

  2. Lisa Wollin says:

    XHTML is a good standard to use, but HTML 4.01 is still very valid and highly used. Both of the examples above can be XHTML-ized by adding a whack before the closing > bracket. ( /> )

    Using the wrong DOCTYPE will just mess up the display of your page, so I would strongly advise against using XHTML unless you absolutely have to or you are creating a new page and can design to the XHTML standard. Even switching from HTML 4.01 strict to HTML 4.01 loose, vice versa, or from no DOCTYPE to any of the above will change the appearance of your page, and perhaps adversely.

    As far as "why does MS need to insert _yet more_ stuff into HTML" … don’t shoot the messenger.

  3. Realtodd says:

    Yeah, but can I do this with a style sheet? I can’t get it to work, but it should be easy one would think.

  4. Lisa Wollin says:

    Since you’re not setting styles in this example, I would guess that this can’t be done. You would need to put the ‘no imagetoolbar’ META element on every page that has images to stop it from showing up in IE.

  5. Jim says:

    <IMG SRC="mypicture.jpg" HEIGHT="100px" WIDTH="100px" GALLERYIMG="no">

    This is incorrect code. The width and height attribute values should be lengths. In HTML, this means either unadorned integers or percentage values. The correct code would be:

    <IMG SRC="mypicture.jpg" HEIGHT="100" WIDTH="100" GALLERYIMG="no">

    (For some value of "correct"; there’s no such attribute as galleryimg in HTML, and the alt attribute that has been mandatory since 1997 is missing).

  6. John says:

    this content = no only works on IE 6 and up i heard…what about disabling for older browsers like IE 3And up..what do we do then? if any one knows please email me at akirwa69@yahoo.com

    thnx..

  7. Mahabub says:

    Want to hide Tool Bar of HTML Page. Please tell me the script.