# Load image object from internal url located in /assets

**URL:** <https://forum.getkirby.com/t/load-image-object-from-internal-url-located-in-assets/30718>\
**Category:** Questions\
**Tags:** v4\
**Created:** [February 7, 2024, 11:21am UTC](https://forum.getkirby.com/t/load-image-object-from-internal-url-located-in-assets/30718 "2024-02-07T11:21:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![samcity](https://avatars.discourse-cdn.com/v4/letter/s/b5a626/32.png) [@samcity](https://forum.getkirby.com/u/samcity)\
**Post date:** [February 7, 2024, 11:21am UTC](https://forum.getkirby.com/t/load-image-object-from-internal-url-located-in-assets/30718/1 "2024-02-07T11:21:43Z")

</div>

My “related pages”-plugin teasers a bunch of other pages. I want to show in this list

- the page title
- The first image from that page

In case the page does not contain an image i want to display a fallback image.  
My image renderer receives image-objects (it resizes the image)  
My default image is located here: assets/images/default.png

I can access my image this way:  
`$image = $kirby->url('assets') . '/images/default.png';`

But as soon as i use $image in my image-renderer, it breaks (because $image contains only a string and not a whole image object).

How can i use the image-url to create/ call the whole image object?

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [February 7, 2024, 11:25am UTC](https://forum.getkirby.com/t/load-image-object-from-internal-url-located-in-assets/30718/2 "2024-02-07T11:25:01Z")

</div>

See [asset() | Kirby CMS](https://getkirby.com/docs/reference/templates/helpers/asset)

---

<div class="post-metadata">

**Author:** ![samcity](https://avatars.discourse-cdn.com/v4/letter/s/b5a626/32.png) [@samcity](https://forum.getkirby.com/u/samcity)\
**Post date:** [February 7, 2024, 2:07pm UTC](https://forum.getkirby.com/t/load-image-object-from-internal-url-located-in-assets/30718/3 "2024-02-07T14:07:55Z")

</div>

Thanks @texnixe , asset did the trick!
