diff --git a/app/assets/javascripts/discourse/components/cdn-img.js.es6 b/app/assets/javascripts/discourse/components/cdn-img.js.es6 index 007d9cb9039..7be0c0b5615 100644 --- a/app/assets/javascripts/discourse/components/cdn-img.js.es6 +++ b/app/assets/javascripts/discourse/components/cdn-img.js.es6 @@ -1,8 +1,10 @@ -export default Ember.Component.extend({ - tagName: 'img', - attributeBindings: ['cdnSrc:src'], +import computed from 'ember-addons/ember-computed-decorators'; - cdnSrc: function() { - return Discourse.getURLWithCDN(this.get('src')); - }.property('src') +export default Ember.Component.extend({ + tagName: '', + + @computed('src') + cdnSrc(src) { + return Discourse.getURLWithCDN(src); + } }); diff --git a/app/assets/javascripts/discourse/templates/components/cdn-img.hbs b/app/assets/javascripts/discourse/templates/components/cdn-img.hbs new file mode 100644 index 00000000000..e4e4459ddbc --- /dev/null +++ b/app/assets/javascripts/discourse/templates/components/cdn-img.hbs @@ -0,0 +1,3 @@ +{{#if src}} + +{{/if}} \ No newline at end of file