PERF: Use cdn when serving site settings upload.
This commit is contained in:
parent
24347ace10
commit
d5c9ac7196
|
@ -35,10 +35,16 @@ export default Ember.Component.extend(UploadMixin, {
|
|||
},
|
||||
|
||||
@computed("imageUrl")
|
||||
backgroundStyle(url) {
|
||||
imageCDNURL(url) {
|
||||
if (Ember.isEmpty(url)) {
|
||||
return "".htmlSafe();
|
||||
}
|
||||
|
||||
return Discourse.getURLWithCDN(url);
|
||||
},
|
||||
|
||||
@computed("imageCDNURL")
|
||||
backgroundStyle(url) {
|
||||
return `background-image: url(${url})`.htmlSafe();
|
||||
},
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
{{#if imageUrl}}
|
||||
<a class="lightbox"
|
||||
href={{imageUrl}}
|
||||
href={{imageCDNURL}}
|
||||
title={{imageFilename}}
|
||||
rel="nofollow noopener">
|
||||
|
||||
|
|
Loading…
Reference in New Issue