summaryrefslogtreecommitdiffstats
path: root/lib/image.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/image.js')
-rw-r--r--lib/image.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/image.js b/lib/image.js
index 40045b3..5b6efb9 100644
--- a/lib/image.js
+++ b/lib/image.js
@@ -1,5 +1,6 @@
-// TODO: Put the project ID in a config file.
+import { imageEndpoint } from '../config';
+
export default function(image, width = 300, height = 300) {
- if(!image || !image.secret) return '';
- return `https://images.graph.cool/v1/cj5xz8szs28930145gct82bdj/${image.secret}/${width}x${height}`;
+ if (!image || !image.secret) return '';
+ return `${imageEndpoint}/${image.secret}/${width}x${height}`;
}