when createImg, as src is also an img attribute, it makes sense to return a single object with all attributes as properties