Added auto image creation code