Image and link methods

Ditto for the image creation logic.