From cd0b07b3adb36fb5ec098f9e511ab45d774fee7b Mon Sep 17 00:00:00 2001 From: Wes Bos Date: Tue, 30 Jan 2018 12:41:01 -0500 Subject: Move to Prisma Backend --- frontend/lib/image.js | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 frontend/lib/image.js (limited to 'frontend/lib/image.js') diff --git a/frontend/lib/image.js b/frontend/lib/image.js new file mode 100644 index 0000000..5b6efb9 --- /dev/null +++ b/frontend/lib/image.js @@ -0,0 +1,6 @@ +import { imageEndpoint } from '../config'; + +export default function(image, width = 300, height = 300) { + if (!image || !image.secret) return ''; + return `${imageEndpoint}/${image.secret}/${width}x${height}`; +} -- cgit v1.3