Add missing change from rel-22 branch to src/image.c