merged image API changes, updated performance fixes for latest image API changes