Allow passing of an object or array as well as the string for a an image. Some changes for directory structure.