Added image handling to import/export functions