replace images with spans specified in js
move where spans are specified