update image sizes, adding some more (#1781)

This commit is contained in:
Gus Caplan
2017-08-15 12:55:07 -07:00
committed by Crawl
parent 71f2cc10f1
commit 6065fe1f8c

View File

@@ -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);