Yohei-Shiina 3 лет назад
Родитель
Сommit
edb86f6f91
1 измененных файлов с 6 добавлено и 0 удалено
  1. 6 0
      packages/app/src/client/util/next-image.ts

+ 6 - 0
packages/app/src/client/util/next-image.ts

@@ -0,0 +1,6 @@
+/**
+ * https://nextjs.org/docs/api-reference/next/image#loader
+ */
+export const nextImageLoader = ({ src, width, quality }: {src: string, width: number, quality: number}): string => {
+  return `${src}?w=${width}&q=${quality}`;
+};