AngularJS directive for validating and figuring out width/height from an image url.