Is there a way to set background image as an Element and not a Variable? | Community
Skip to main content
July 7, 2016
Question

Is there a way to set background image as an Element and not a Variable?

  • July 7, 2016
  • 2 replies
  • 2146 views

I am editing a landing page for a client and they are asking to be able to update background images the same way they update the other images - as dynamic content, able to pick from an admin panel of images.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

2 replies

Justin_Cooperm2
Level 10
July 7, 2016

Graham Lutz​ - not that will work with all email clients. It's actually quite tricky to make it work correctly. You'll see that there is some conditional code for various versions of Outlook. There are ways to do it as an Image element in a Landing Page, however.

Justin

July 7, 2016

This is going to be a landing page, not an email template. Do you know how to do it in a Landing Page?

Grégoire_Miche2
Level 10
July 7, 2016

Hi Graham,

Image elements generate <img> tags. while a background image is anything BUT and imag element with a backgound css property.

So the only way to do this with an image element, would be to use some JS to capture the image and use it at a background somewhere else.

-Greg

Justin_Cooperm2
Level 10
July 7, 2016