refactor(dev): extract img str parser
Created by: michaellzc
Extract the logic to parse raw img string from updateImage
method to make it reusable.
Test plan
See added unit test. We shouldn't need any extensive testing for this method, it's just a wrapper on top of some other well-tested (hopefully) image name parser.