# Get an absolute asset/icon path for custom components using wwLib

**URL:** <https://community.weweb.io/t/get-an-absolute-asset-icon-path-for-custom-components-using-wwlib/19959>\
**Category:** How do I?\
**Created:** [September 12, 2025, 12:19pm UTC](https://community.weweb.io/t/get-an-absolute-asset-icon-path-for-custom-components-using-wwlib/19959 "2025-09-12T12:19:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Antiokh](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/antiokh/32/2794_2.png) [@Antiokh](https://community.weweb.io/u/Antiokh)\
**Post date:** [September 12, 2025, 12:19pm UTC](https://community.weweb.io/t/get-an-absolute-asset-icon-path-for-custom-components-using-wwlib/19959/1 "2025-09-12T12:19:02Z")

</div>

Hi! I’ve found some ways to get an absolute path from wwLib:

1. wwLib.useIcons() // suggested by AI
2. wwLib.wwUtils.getImgCdnUrl(path)

Also I’ve found a couple of functions which return cdn base path, but if we’re using custom paths for assets, I’m not sure if I’ll get the right path.

Asked on WeWeb OfficeHours.

What’s the most solid and update-proof way to get it?

@flo @Matthew_S

---

<div class="post-metadata">

**Author:** ![Matthew\_S](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/matthew_s/32/13342_2.png) [@Matthew\_S](https://community.weweb.io/u/Matthew_S)\
**Post date:** [September 15, 2025, 10:33am UTC](https://community.weweb.io/t/get-an-absolute-asset-icon-path-for-custom-components-using-wwlib/19959/2 "2025-09-15T10:33:04Z")

</div>

Hey Anton 👋 ,

I checked with one of our devs on this. The most reliable way to get the absolute path isn’t through wwLib functions, but by using the actual asset path directly.

**For images:**

```auto
<website-url>/images/<img-name>

```

**For files:**

```auto
<website-url>/files/<file-name>

```

I hope this helps.

You mentioned getting the absolute path of an icon from the project - what is your use case?

---

<div class="post-metadata">

**Author:** ![Antiokh](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/antiokh/32/2794_2.png) [@Antiokh](https://community.weweb.io/u/Antiokh)\
**Post date:** [September 16, 2025, 4:42pm UTC](https://community.weweb.io/t/get-an-absolute-asset-icon-path-for-custom-components-using-wwlib/19959/3 "2025-09-16T16:42:06Z")

</div>

The case is when I need some icon to be shown inside my component. Thank you for those templates-placeholders. I’ll try them.
