Formats an image DOM element that has an invalid source.
DOMElement $image: An IMG node to format, parsed from the filtered text.
void Unlike other theme functions, the passed in $image is altered by reference.
_filter_html_image_secure_process()
function theme_filter_html_image_secure_image(&$variables) {
$image = $variables['image'];
// Turn an invalid image into an error indicator.
$image
->setAttribute('src', base_path() . 'core/misc/message-16-error.png');
$image
->setAttribute('alt', t('Image removed.'));
$image
->setAttribute('title', t('This image has been removed. For security reasons, only images from the local domain are allowed.'));
// Add a CSS class to aid in styling.
$class = $image
->getAttribute('class') ? trim($image
->getAttribute('class')) . ' ' : '';
$class .= 'filter-image-invalid';
$image
->setAttribute('class', $class);
}