feat: preview support for .webp extension, webhooks doc reference quick link

Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com>
This commit is contained in:
Raju Udava
2022-02-18 10:52:25 +05:30
parent b936be06d7
commit c4175bd567
3 changed files with 19 additions and 8 deletions

View File

@@ -1,14 +1,22 @@
const imageExt = ['jpeg', 'gif', 'png', 'png', 'svg', 'bmp', 'ico', 'jpg']
const imageExt = [
"jpeg",
"gif",
"png",
"png",
"svg",
"bmp",
"ico",
"jpg",
"webp",
];
export default imageExt
export default imageExt;
const isImage = (name) => {
return imageExt.some(e => name.toLowerCase().endsWith(`.${e}`))
}
return imageExt.some((e) => name.toLowerCase().endsWith(`.${e}`));
};
export {
isImage
}
export { isImage };
/**
* @copyright Copyright (c) 2021, Xgene Cloud Ltd
*