Add image generation support (#207)

Co-authored-by: Germey <germey@acedata.cloud>
This commit is contained in:
GermeyandGermey authored and GitHub committed 2025-04-05 01:47:31 +08:00
1 parent 57e12efc80
commit 4114e687dc
4 files changed
+27 -5

No files matched your search

+7
View File
@@ -34,3 +34,10 @@ export const isOfficial = (): boolean => {
export const isSubOfficial = (): boolean => {
return isOfficial() && window.location.host !== BASE_HOST_HUB;
};
/**
* is image url
*/
export function isImageUrl(url: string): boolean {
return /\.(jpg|jpeg|png|gif|bmp|webp|svg|tiff?)$/i.test(url);
}