mirror of
https://github.com/discourse/discourse.git
synced 2024-11-26 02:40:53 -06:00
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
Block a user