Obsolete
Status Update
Comments
bl...@google.com <bl...@google.com> #2
Automated by Blunderbuss job workspace-devrel-public-issue-tracker-blunderbuss-autoassigner for component 191602.
jp...@google.com <jp...@google.com> #3
Is this still an issue? Some fixes rolled out recently.
Description
When using a background image style in an email, Gmail is removing the entire style attribute, or style block in forwarded emails.
The issue happens with both `background` and `background-image` properties. However both are still supported when using gradients, this only appears to be affecting images.
**A small code sample that reliably reproduces the issue. The sample should run as-is or with minimal setup, without external dependencies.**
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
.image{
background-image:url(
height:200px;
width:200px
}
.test{
background:red;
}
</style>
</head>
<body>
<h1>Testing background image</h1>
<div style="background:url(
background image inline.
</div>
<div class="image">
background image class.
</div>
<div class="test">
this should have a simple red background
</div>
</body>
</html>
```
**What steps will reproduce the problem?**
1. Include a background image inside the `style` attribute or embedded `<style>` sheet
2. Sent the email to any account
3. Forward the email to a Gmail account.
3. View the forwarded email in the inbox.
**What is the expected output? What do you see instead? If you see error messages, please provide them.**
I would expect to see the background image still supported as it is elsewhere.
**Please provide any additional information below.**
* Removing the entire `style` attribute or embedded `<style>` sheet is a common issue with Gmail when it encounters styles unsupported by Gmail.
* Firefox 115.0.2 and Safari 16.5.1 don't show the issue
* Android and iOS Gmail apps don't show the issue
* Gmail docs say that `background` and `background-image` are supported