Added support for trigger an event when an image is loaded
Updated the event handling example to show how this works
- Thanks to @jmhmd for this idea