add ability to pass in native image objects instead of just string to source for better performance