RequestPolicy/requestpolicy — Issue #211: Image Placeholder should have some indicator of original element
Author: jsamuel
Created: 2011-12-22 19:00:35+00:00
State: open
Labels: extension

imported trac ticket
created: 2011-03-12 11:48:34
reporter: eibwen

Blocked images have a src attribute that point to what would have been loaded; however, when image placeholders are enabled, the src is changed to a data url showing the request policy flag and the original src attribute is not preserved...

As such, it is very difficult to determine the original src for dynamically added images (may require observing individual ajax responses and trying to correlate those to a specific image) and is cumbersome to try and locate the original src attribute in the page source for static images.

Compare noscript placeholders, which do provide information for the original elements and attributes.

Note that we cannot merely clobber other attributes (eg alt, title, onerror) with the original src as the original image may have specified those attributes. If we wrap the image with another element and style that element, it could break the css layout of the original page.

Perhaps copy the original src attribute to a new _src attribute (is _ a valid first character?) and then change the src attribute?

Not sure.

Regardless, not having access to the original element attributes is frustrating. Given the ratio of legitimately 404 images to blocked images, I may just disable placeholders until this is resolved...