There has been much of a discussion about the background color of standalone images when Firefox adopted to dark body background for standalone images. Initially Firefox simply displayed a white background (only for the image), which felt out-of-place considering the dark surrounding background, especially while the image was loading. Then it removed the white background all together, making the background of images transparent until they load, and switching to white as soon as the image is loaded. which made the behavior of images like this really confusing.
Then came along some awesome mockups by Stephen which introduced options to choose the background of your image. Sadly, there is no tentative plan for that to land into Firefox.
And then I thought, “Hey!, it’s an add-on thing”, and created an add-on that brings the feature as depicted in the mockups into Firefox.

Thus “Custom Standalone Image Backgrounds” add-on was born. Yeah, the name is a bit long. Anyways, give it a try by installing the add-on from the AMO homepage, or via this direct link. It is still a work in progress, but should work for most of the cases. I will update it as and when I get time
PS: For now, this works only on Firefox Aurora and Nightly (18 and 19)
PPS: I have updated the add-on on AMO to version 0.3, which works with Firefox 15 and above, and also fixes some of the issues mentioned in comments. (most probably the NoScript and lesser distractive in unpinned state)

Hi. Sounds great but I can’t make it work for me. Just don’t get the color panel, only see the image.
Would love to get it to work.
Using FF16.0.1 es-ES here on Win7 Pro 32 bits
Cheers,
Hi, right now its only for Aurora (18) and Nightly (19), but I will update it as soon as possible to work with Firefox 15+ too
Hi, I have updated the add-on so that version 0.3 now works with Firefox 15 and above too.
Great idea! But it’s annoying how the images get covered up by the bar. Maybe when the bar is pinned, the sidebar shouldn’t hover over the viewport, but instead move to the left of it.
True. Should add to the checklist for next versions.
Will soon upload it to github, as soon as the add-on is approved atleast.
Nice! Sadly it breaks with NoScript due to Firefox scoping bugs :<
Is there a possibility to abuse :target {} to set the bg colour without needing js (for the default colours at least)?
I am not sure about that. But I know that there is a chrome content conflict, that I will fix in next version. Hopefully NoScript should not have an effect then.
Hey, does it break with the latest 0.5 version too ?
It wouldn’t be bad if the add-on could pick one of the 3 (white, grey, black) colours for background, depending on the picture’s main colour and/or overall lightness, when that option is selected.
Also, I think you should add a small panel to the picker bar, where the user could chose the preferred position of the picture (the 8 main cardinal points and the centre).
Sure, I will post the link to the issue when I will create it, and we can discuss more over github.
Noticed this triggers on Bugzilla image attachments and overlays the image ‐ https://bugzilla.mozilla.org/attachment.cgi?id=673928&action=edit
Yeah, it would do that as the image there is in its own iFrame, which is another browser in itself. Although versoin 0.3 would overlay the image in the minimal amount possible.