improved handling of custom AI image