code: function clImage(Cloudinary) {
          return {
              restrict: 'E',
              replace: true,
              transclude: true,
              template: '<img ng-transclude/>',
              scope: {},
              priority: 99,
              controller: ["$scope", function ($scope) {
                  this.addTransformation = function (ts) {
                      $scope.transformations = $scope.transformations || [];
                      $scope.transformations.push(ts);
                  };
              }],
              link: function (scope, element, attrs) {
                  var attributes = getAttributes(attrs);
                  if (scope.transformations) {
                      attributes.transformation = scope.transformations;
                  }
                  var deregisterObserver = attrs.$observe('publicId', function (publicId) {
                      if (!publicId)
                          return;
                      element.attr('src', Cloudinary.url(publicId, attributes));
                      //deregisterObserver();
                  });
                  if (attrs.htmlWidth) {
                      element.attr("width", attrs.htmlWidth);
                  }
                  else {
                      element.removeAttr("width");
                  }
                  if (attrs.htmlHeight) {
                      element.attr("height", attrs.htmlHeight);
                  }
                  else {
                      element.removeAttr("height");
                  }
              }
          };
      }
docs: /* @ngInject