added onRender event to allow users to get a callback before the image source is set