# Accessing Image Files in CMS Theme Development

**URL:** <https://community.hubspot.com/t/accessing-image-files-in-cms-theme-development/21903>\
**Category:** CMS Development\
**Created:** [June 19, 2020, 5:52pm UTC](https://community.hubspot.com/t/accessing-image-files-in-cms-theme-development/21903 "2020-06-19T17:52:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![DavidFJones](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/davidfjones/32/75439_2.png) [@DavidFJones](https://community.hubspot.com/u/DavidFJones)\
**Post date:** [June 19, 2020, 5:52pm UTC](https://community.hubspot.com/t/accessing-image-files-in-cms-theme-development/21903/1 "2020-06-19T17:52:38Z")

</div>

Hello,  
How does one access image files while making a custom CMS theme?  
I am able to upload the images using the local development tools, but can’t seem to find how to get these files onto the page.  
I have tried using

`get_asset_url('')`

but understand now that this is only used for js, html and css files.  
Thank you

---

<div class="post-metadata">

**Author:** ![TRooInbound](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/trooinbound/32/89545_2.png) [@TRooInbound](https://community.hubspot.com/u/TRooInbound)\
**Post date:** [June 20, 2020, 11:26am UTC](https://community.hubspot.com/t/accessing-image-files-in-cms-theme-development/21903/2 "2020-06-20T11:26:49Z")

</div>

Hi @DavidFJones

You can use direct file manager path here, no need to use this type of path as an image is editable from page edit mode. so issues to adding static file manager path here.

See this screenshot - [Screenshot by Lightshot](https://prnt.sc/t39fu8)

FYI - need to add image path in single quote.

We hope it works for you.

Did our post help answer your query? Help the community by marking it as a solution.

Thanks,

Team TRooInbound

---

<div class="post-metadata">

**Author:** ![stefen](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/stefen/32/29274_2.png) [@stefen](https://community.hubspot.com/u/stefen)\
**Post date:** [June 22, 2020, 1:03pm UTC](https://community.hubspot.com/t/accessing-image-files-in-cms-theme-development/21903/3 "2020-06-22T13:03:52Z")

</div>

@DavidFJones when using the **get\_asset\_url** inside a HubSpot theme, you can use a relative path to the image file. Let’s say your theme is structured like so:

- /images
  - example.jpg

- /templates
  - home.html

if you wanted to reference the example.jpg inside the home.html you would use the function like so:

`{{ get_asset_url('../images/example.jpg') }}`

---

<div class="post-metadata">

**Author:** ![daveroma](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/daveroma/32/82727_2.png) [@daveroma](https://community.hubspot.com/u/daveroma)\
**Post date:** [June 23, 2020, 3:06pm UTC](https://community.hubspot.com/t/accessing-image-files-in-cms-theme-development/21903/4 "2020-06-23T15:06:01Z")

</div>

Hey @DavidFJones

get\_asset\_url() is the move - you may just need to back up a directory or 2…

Here’s some real-world HTML + HubL code I used to render an image in my [HubSpot Theme](https://www.drivewebstudio.com/hubspot-cms/themes/demo)

`<img src="{{ get_asset_url('../../images/img-meeting-default.png') }}" alt="meeting-calendar">`

Let me know if this helps!
