recommending not to use the on error method fixes #1
set visibility visible after optimisation load
removed inline dimensions on optimize fixes #2
refactoring so the visibility change only happens on initial inject image
build