build image kind
modified image dealing function