Image Trackers
Some third-party images set cookies when they load — tracking pixels, social badges, embed previews, or widget images. Because a browser requests an image as soon as it parses the src attribute, these cookies are set before your visitor makes a consent choice.
Consent Pro detects these images during a scan and reports them so you can label them and block them manually.
Block a tracking image until its category is permitted
For an image you control in your own page, remove its live src, hold the tracking URL in fs-consent-src, and set the required fs-consent-categories. The browser must not receive the tracking URL in a live source before the category is allowed. Publish and verify actual image requests before a choice, after rejection, after granting only the relevant category, and after withdrawal. Removing an image source cannot undo a request already sent.
For an image inside a cross-origin iframe, review and gate the parent embed instead; the host page cannot edit the third-party document. A saved category or an absent cookie alone does not prove the image stayed blocked. The blocking example below shows the supported markup.
How detection works
When Consent Pro scans your website, it loads each page in a real browser and watches the network responses of every third-party image, including redirects. If an image response sets a cookie, the scanner:
- Captures the cookie from the response headers — including
httpOnlycookies that are invisible to JavaScript - Attributes the cookie to the exact image that set it
- Reports the image and its cookies in the Consent Manager
In the Manager, these trackers show a from Image badge. A scan that finds cookie-setting images also creates an action item so you can review them.
Why images need a manual step
For scripts, Consent Pro can prevent execution before consent. Images work differently: the browser requests an image the moment a live src attribute is present in the HTML — there is no execution step to intercept. Leaving the tracking URL in a normal src attribute means the request (and its cookies) always fires, and Consent Pro cannot stop it.
That's why you swap the attribute once by hand. From there, Consent Pro takes over: it loads the image automatically when the visitor accepts the required categories, and removes the src again if consent is revoked — the same pattern used for iframes.
Block an image
Store the URL in fs-consent-src and add fs-consent-categories:
- Open the embed or element that renders the image
- Remove the normal
srcattribute so the browser does not request the image before consent - Use
fs-consent-srcfor the image URL andfs-consent-categoriesfor the category - Publish your site — Consent Pro sets
srcautomatically once the visitor accepts the category
Example:
<img fs-consent-src="https://example.com/tracking-pixel.svg" fs-consent-categories="marketing" alt="" />TIP
The Consent Manager generates this snippet for you. Open the affected tracker in Consent Manager, and the editor shows install instructions with a copy-ready snippet for each attributed image.
If the image is already labeled as a tracker in the Consent Manager, Consent Pro can also resolve its categories from your saved configuration — fs-consent-categories is then optional, but recommended for clarity.
Category Reference
Set fs-consent-categories to the value that matches the type of cookies the image sets:
| Category | Value |
|---|---|
| Essential | essential |
| Analytics | analytics |
| Marketing | marketing |
| Personalization | personalization |
You can assign an image to multiple categories by separating values with a comma — it will only load once the visitor has accepted all of the specified categories.
Essential images don't need blocking
Essential cookies don't require consent, so an image whose cookies are essential — for example a badge that only sets a security or bot-management cookie — can keep its normal src attribute. Just label the tracker as Essential in the Consent Manager so it's disclosed correctly.
Related
- Image Trackers for Webflow — where to find them and what to change in a Webflow site
- Image Trackers for the Web App — the same for a custom site
- Async Script Loading — manually updating scripts and iframes
- Performance & Privacy