We have some decorative images in our emails, such as general lifestyle images, which are not intended to be clickable. And I would like to avoid hyperlinking these images to some generic URLs, as adding more links to emails is generally not recommended, if not mistaken.
Currently, we use the following hyperlink format: {{ emptyURL|add:"#" }}. This adds a "#" slug to the images, making them non-clickable. The goal of this approach was to prevent the display of a download button when hovering over an image in Gmail desktop, as images without any URL will show a download button on hover.
However, I believe this practice may have several drawbacks. It could lead to issues with spam filters, create confusion for screen reader users regarding accessibility, and potentially affect click tracking. Do you agree?
What you guys think and what do you do for such images? Thanks!
Best answer by Amos Peace
Hello lleontiy,
Here's what worked for a friend:
Prevent Hyperlinking: Instead of using {{ emptyURL|add:"#"}}, remove the hyperlink entirely and use this CSS approach:
This ensures the image remains non-clickable and avoids unnecessary "#" links that can confuse spam filters or impact accessibility.
Address Gmail's Hover Behavior: Gmail adds a "download" button for images without links. Using the pointer-events CSS property as shown above helps mitigate this issue while keeping the image as plain text.
Accessibility Tip: For purely decorative images, leave the alt attribute empty (alt=""). This signals screen readers to ignore the image, improving the experience for users who rely on them.
Simplify Email Design: Where possible, consider whether decorative images are essential. Minimizing unnecessary elements can also improve deliverability.
This method solved the same problem for my team member and improved email performance.
This ensures the image remains non-clickable and avoids unnecessary "#" links that can confuse spam filters or impact accessibility.
Address Gmail's Hover Behavior: Gmail adds a "download" button for images without links. Using the pointer-events CSS property as shown above helps mitigate this issue while keeping the image as plain text.
Accessibility Tip: For purely decorative images, leave the alt attribute empty (alt=""). This signals screen readers to ignore the image, improving the experience for users who rely on them.
Simplify Email Design: Where possible, consider whether decorative images are essential. Minimizing unnecessary elements can also improve deliverability.
This method solved the same problem for my team member and improved email performance.
You’ve raised an important point regarding best practices for decorative images in emails. Here's a breakdown of the considerations and some alternative approaches:
Current Approach: Adding # to Links
Using {{ emptyURL|add:"#" }} prevents Gmail from showing the "download" button but introduces potential issues:
Spam Filters: Empty or placeholder links can raise red flags for spam filters.
Accessibility: Screen readers might interpret these as clickable elements without meaningful content, leading to confusion.
Click Tracking: Placeholder links may inflate click metrics inaccurately.
Better Alternatives for Non-Clickable Decorative Images
1. Role and ARIA Attributes for Accessibility
For purely decorative images, you can use:
role="presentation" or aria-hidden="true" in the HTML.
This signals screen readers to ignore the image.
2. Prevent Gmail’s Download Button Without Links
Instead of adding #, try these solutions:
Use CSS to style the image:
css
CopyEdit
img { pointer-events: none; }
Or wrap the image in a div container with pointer-events: none; applied to the wrapper.
3. Optimizing Clickable Areas
If it’s necessary to hyperlink all images for some reason, ensure decorative images point to a relevant, neutral destination like your homepage rather than a placeholder.
4. Email Client Testing
Always test how your emails render in different clients (Gmail, Outlook, Apple Mail) using tools like Litmus or Email on Acid to ensure the desired behavior.
By implementing these changes, you can improve email accessibility, reduce spam risks, and maintain clean analytics. Let me know if you need help with any of the technical steps!
By clicking “Accept All Cookies,” you agree to the storing of cookies on your device to enhance site navigation, analyze site usage, and assist in our marketing efforts.
Privacy Preference Center
Your Privacy
Strictly Necessary Cookies
Performance Cookies
Functional Cookies
Targeting Cookies
Site Analytics
Your Privacy
When you visit any website, it may store or retrieve information on your browser, mostly in the form of cookies. This information might be about you, your preferences or your device and is mostly used to make the site work as you expect it to. The information does not usually directly identify you, but it can give you a more personalized web experience. Because we respect your right to privacy, you can choose not to allow some types of cookies. Click on the different category headings to find out more and change our default settings. However, blocking some types of cookies may impact your experience of the site and the services we are able to offer.
Privacy Notice
Strictly Necessary Cookies
Always Active
These cookies are necessary for the website to function and cannot be switched off in our systems. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms. You can set your browser to block or alert you about these cookies, but some parts of the site will not then work. These cookies do not store any personally identifiable information.
Performance Cookies
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us to know which pages are the most and least popular and see how visitors move around the site. All information these cookies collect is aggregated and therefore anonymous. If you do not allow these cookies we will not know when you have visited our site, and will not be able to monitor its performance.
Functional Cookies
These cookies enable the website to provide enhanced functionality and personalisation. They may be set by us or by third party providers whose services we have added to our pages. If you do not allow these cookies then some or all of these services may not function properly.
Targeting Cookies
These cookies may be set through our site by our advertising partners. They may be used by those companies to build a profile of your interests and show you relevant adverts on other sites. They do not store directly personal information, but are based on uniquely identifying your browser and internet device. If you do not allow these cookies, you will experience less targeted advertising.
Site Analytics
These cookies record your visit to our website, and are used to track your visit including information such as: web page interactions (clicks, hovers, focus, mouse movements, browsing, zooms and other interactions), referring web page/source through which you accessed the Sites, heatmaps and scrolls, screen resolution, ISP, and statistics associated with the interaction between device or browser and the Sites. If you are accessing our Services with a European IP address, you have been asked to consent to the use of these cookies (you are free to deny your consent).