Fix ImageParent: image template converted to twic, include didn't work anymore

also move helper function into static function so we can use it here
Fix logic: lazyLoadOutOfViewport needs to be inverted to get loadImmediately

BTW: why don't we simply use lazyLoadOutOfViewport as class?
That would be too easy...