Fixed undef value warning
Let cropimg handle needle metadata json