now can open a local img file and also support drag and drop