diff --git a/payload/src/collections/Media.ts b/payload/src/collections/Media.ts index 00f928d..b3fd5fd 100644 --- a/payload/src/collections/Media.ts +++ b/payload/src/collections/Media.ts @@ -2,10 +2,6 @@ import { CollectionConfig } from "payload/types"; export const Media: CollectionConfig = { slug: "media", - labels: { - singular: "Bild", - plural: "Bilder", - }, admin: {}, access: { read: (): boolean => true, @@ -15,10 +11,16 @@ export const Media: CollectionConfig = { upload: { staticURL: "/media", staticDir: "media", - mimeTypes: ["image/*"], + adminThumbnail: ({ doc }) => `/media/${doc.src}`, }, - fields: [], + + fields: [ + { + name: "alt", + type: "text", + }, + ], }; export default Media; diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..6823519 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,12 @@ +{ + "include": ["*.ts"], + "exclude": ["node_modules"], + "references": [ + { + "path": "./astro/tsconfig.json" + }, + { + "path": "./payload/tsconfig.json" + } + ] +}