plot_img cleanup