Move image URL logic to model.