# Email template - assets URL

**URL:** <https://forum.mautic.org/t/email-template-assets-url/4447>\
**Category:** Product Support\
**Created:** [June 10, 2016, 1:41pm UTC](https://forum.mautic.org/t/email-template-assets-url/4447 "2016-06-10T13:41:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![smitka](https://avatars.discourse-cdn.com/v4/letter/s/a5b964/32.png) [@smitka](https://forum.mautic.org/u/smitka)\
**Post date:** [June 10, 2016, 1:41pm UTC](https://forum.mautic.org/t/email-template-assets-url/4447/1 "2016-06-10T13:41:11Z")

</div>

Hi,  
  
I’m trying to create own HTML email template in Mautic 1.4.1 and I have problems with the image’s URLs in final email.  
  
  
  
I have created the basic structure:  
  
  
  
config.php

- html  
  
– email.html.php  
- images  
  
– logo.png  
  
  
  
In the template I’m using

Code:

\<?php echo $view['assets']-\>getUrl('/templates/my\_template/images/logo.png'); ?\>

as image src.  
  
The result is "/templates/my\_template/images/logo.png" in the final e-mail, which doesn't work, of course. The workaround is to use the absolute URL as image path, but it ruins portability of the template.  
  
What am I doing wrong?  
  
I also wonder if it is possible to "pack" images into e-mail as attachements.  
  
Thanks.

---

<div class="post-metadata">

**Author:** ![smitka](https://avatars.discourse-cdn.com/v4/letter/s/a5b964/32.png) [@smitka](https://forum.mautic.org/u/smitka)\
**Post date:** [June 10, 2016, 1:41pm UTC](https://forum.mautic.org/t/email-template-assets-url/4447/2 "2016-06-10T13:41:11Z")

</div>

Hi,  
I’m trying to create own HTML email template in Mautic 1.4.1 and I have problems with the image’s URLs in final email.

I have created the basic structure:

config.php

- html  
– email.html.php
- images  
– logo.png

In the template I’m using

```auto
<?php echo $view['assets']->getUrl('/templates/my_template/images/logo.png'); ?>
```

as image src.

The result is “/templates/my\_template/images/logo.png” in the final e-mail, which doesn’t work, of course. The workaround is to use the absolute URL as image path, but it ruins portability of the template.

What am I doing wrong?

I also wonder if it is possible to “pack” images into e-mail as attachements.

Thanks.
