Link Background Image

Update 2/11/2010: Added support for Multiple Background Images

Over a year ago I posted about the lack of a View Background Image option in Firefox when right-clicking on links. As a web designer, I use that context menu item on a regular basis, so for it to not be there for links seemed like a glaring omission.

To my surprise, a very kind volunteer came to the rescue with a head-start on an extension and an invitation to improve on it. The problem was that his simple extension did exactly what I wanted it to. When you right-clicked on a link, there was a “View Background Image” item that, when you clicked on it, linked to the CSS background-image of that element.

I didn’t feel the need to improve on James’ extension until it stopped working in Firefox3. Yes, there are many other ways of discovering the background-image of an element in Firefox (specifically through Firebug and the Web Developer Toolbar) but I wanted my context menu item back, so I dove into the extensions folder and added the following functionality:

  • It checks for a background image on the link you right-clicked on.
  • If it…
    • Finds an image: You get a “View Link Background Image” context menu item.
    • Doesn’t find an image, but finds one on its immediate parent: You get a “View Parent Background Image” context menu item.
    • Finds no image on the link or its immediate parent: You get a disabled “View Link Background Image” context menu item.

While it doesn’t seem like a mission-critical extension, I’ve started relying on it for my day-to-day work and thought you might find it useful as well.

So without further ado, you can download the extension here.

4 comments on “Link Background Image

Ken says:

I’ve been.. uh.. beta testing.. this for a while. Works like a charm. Good stuff, Jason.

James Booker says:


Many thanks for the kind words and the links – I’m glad you finally got around to doing something with this – glad you’re finding it useful!


Azuka says:

Hello. Your link to the extension no longer works.

Doh! Fixed the link. Thanks for letting me know.

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to the top!