Fixed behavior of image attaching when adding an entry