Mouse over the img element - its opacity changes between 0.25 and 1.
Created attachment 38653 [details] Test case
Created attachment 38654 [details] Patch
Comment on attachment 38654 [details] Patch r=me
Fixed in r47805.
I filed bug 50418 to optimize this.