Fix pending previous added image issue

Fixed the issue that the image from the recent adding got pending and added to the new created task that did not have an image.