# Export value from custom module to html email template

**URL:** <https://community.hubspot.com/t/export-value-from-custom-module-to-html-email-template/146128>\
**Category:** CMS Development\
**Created:** [February 11, 2026, 7:45pm UTC](https://community.hubspot.com/t/export-value-from-custom-module-to-html-email-template/146128 "2026-02-11T19:45:21Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![Anton](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/anton/32/103167_2.png) [@Anton](https://community.hubspot.com/u/Anton)\
**Post date:** [February 12, 2026, 7:28am UTC](https://community.hubspot.com/t/export-value-from-custom-module-to-html-email-template/146128/5 "2026-02-12T07:28:25Z")

</div>

Hey @NWombwell6,

just use the custom module and modify it to something like this:

```lia-code-sample
{% require_css %}
 <style>
 .email-header{
 background-image: {{ module.mobile_background_image.src }};
 width:100%;
 height:{{module.mobile_background_image.height}};
 background-repeat: no-repeat;
 background-position:center bottom right;
 }
 @media screen and (min-width:420px){
 .email-header{
 background-image: {{ module.desktop_background_image.src }};
 height:{{module.desktop_background_image.height}};
 }
 }
</style>
{% end_require_css %}

<table class="email-header" align="center" role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%" style="width:100%; border-collapse:collapse; background-color:{{ bg_color }};">

<!-- section content here -->

</table>

```

If you’re using HubDB for managing the images, you can use either the image column or a text field for the image URL

best,

Anton

---

_[View the full topic](https://community.hubspot.com/t/export-value-from-custom-module-to-html-email-template/146128)._
