# Strange Behavior Triggered by image() Function

**URL:** <https://discourse.processing.org/t/strange-behavior-triggered-by-image-function/7638>\
**Category:** Coding Questions\
**Created:** [January 19, 2019, 10:59am UTC](https://discourse.processing.org/t/strange-behavior-triggered-by-image-function/7638 "2019-01-19T10:59:30Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![GoToLoop](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gotoloop/32/86_2.png) [@GoToLoop](https://discourse.processing.org/u/GoToLoop)\
**Post date:** [January 22, 2019, 6:00am UTC](https://discourse.processing.org/t/strange-behavior-triggered-by-image-function/7638/6 "2019-01-22T06:00:02Z")

</div>

> [@JackWitherell](#):
>
> I’d like to contain a PImage inside of a class so I can add functionality to it and add abstraction,

Still, the best approach for assets is to load them all at once within **setup()**. 😏

After that, we can pass those already loaded assets as 1 of the arguments of our classes’ constructors. 💡

---

_[View the full topic](https://discourse.processing.org/t/strange-behavior-triggered-by-image-function/7638)._
