Excluding Images by URL

Summary

When email content is rendered in HTML it is possible to include images within HTML tags. During email processing JEMHC can extract the embedded images from these HTML tags and convert them to appropriate wiki markup so that the image shown in the email is also shown inline on the created issue or comment. Images referred in HTML tags by an absolute URL (http://server/file.png) are not contained within the email meaning that the other JEMHC attachment exclusion methods are not capable of filtering out.

Image URL exclusion allows you to configure a list of image URL's as regular expressions that JEMHC will exclude from inclusion within final wiki markup. Exclusions images by URL can be configured at the global level within JEMHC by a System Administrator and by Project Admins who can also create and configure project scoped image URL exclusion rules via the JEMHC configuration exposed in the project administration section.

A common use case for exclusion images by URL is email signatures that contain links to images and icons within HTML tags, you could configure JEMHC to exclude these known image URL's so that future emails do not embed these unwanted images.

Exclude Image by URL configuration can be configured globally by a system administrator via JEMHC Administration -> Exclusions → Exclude Image URL

Exclude Image by URL can also be configured at the project level by a user with project administrator permissions via Project Settings → JEMHCloud → Exclusions → Exclude Image URL

Creating a new image URL exclusion

Pressing the Create button within the list of existing exclusion rules will trigger a popup window to create a new exclusion rule. In this example we want to exclude a specific image URL from being converted to wiki markup by JEMHC. We have located the offending image on an existing image and examined the wiki markup within to determine the URL of the image. For this example we have determined that an image is being included in issues with the following wiki markup:

!http://www.example.com/anImage.png!

The URL between the ! symbols is the URL that we would like to exclude. 

Create a new image URL exclusion rule by pressing the Create button within the exclude image URL section. A popup window will appear. You can define an address to exclude as a regular expression within the URL Regex field. If you are creating the rule in the global JEMHC configuration, the rule will be scoped to apply globally to all projects by default. If you would like to to scope the rule to only apply to a specific project you can select a project via the Project field.

Pressing the Save button will create the new exclusion rule, the newly created rule will be shown in the list of all exclusion rules.

Exclude All Images from a Domain Using a Regular Expression

In this example we would like to exclude all images from a specific domain. The example domain is www.example.com and the goal is to exclude all image URL's that contain this domain. Image URL exclusion rules are regular expression compatible, which means a regular expression can be used as part of a rule to match many possible image URL's. For this example we will use the following regular expression:

http://www.example.com/.*

The above regular expression will match any possible URLs that may exist past the / in the URL which should match all possible image URL's that could exist for the domain. (Not including subdomains).

Create a new exclusion rule by pressing the Create button in the image URL exclusion section. In the popup window that appears enter the regular expression to match the desired domain in the URL Regex field. If the rule is required to be scoped to a project then select a project via the Project field.

Pressing the Save button will create the new exclusion rule. The newly created rule will be shown in the list of all exclusion rules.