Now returns the image instead of setting it directly.