public function attachmentImageFilter($key, $filter, $title = '', $altImageUrl = null)
    {
        $url = $this->attachmentUrlFilter($key, $filter);

        if ('' == $url && null === $altImageUrl)
        {
            return '';
        }

        return '<img src="'.('' != $url ? $url : $altImageUrl).'" title="'.htmlspecialchars($title).'" />';
    }