From 6065fe1f8c9917f0a57a927cdd465de02ac776f3 Mon Sep 17 00:00:00 2001 From: Gus Caplan Date: Tue, 15 Aug 2017 12:55:07 -0700 Subject: [PATCH] update image sizes, adding some more (#1781) --- src/util/Constants.js | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/util/Constants.js b/src/util/Constants.js index 44ea09542..5651614c7 100644 --- a/src/util/Constants.js +++ b/src/util/Constants.js @@ -95,13 +95,7 @@ const AllowedImageFormats = [ 'gif', ]; -const AllowedImageSizes = [ - 128, - 256, - 512, - 1024, - 2048, -]; +const AllowedImageSizes = Array.from({ length: 8 }, (e, i) => 2 ** (i + 4)); function makeImageUrl(root, { format = 'webp', size } = {}) { if (format && !AllowedImageFormats.includes(format)) throw new Error('IMAGE_FORMAT', format);