added support to load an external image