diff --git a/docker-compose-dev.yml b/docker-compose-dev.yml index e09c316..b66cedd 100644 --- a/docker-compose-dev.yml +++ b/docker-compose-dev.yml @@ -16,6 +16,7 @@ services: volumes: - ./payload/src:/base/src - ./astro/src/types.ts:/types.ts + - ./data/media:/base/dist/media ports: - 3001:3001 diff --git a/payload/src/collections/Media.ts b/payload/src/collections/Media.ts index b3fd5fd..45b2d21 100644 --- a/payload/src/collections/Media.ts +++ b/payload/src/collections/Media.ts @@ -12,7 +12,7 @@ export const Media: CollectionConfig = { staticURL: "/media", staticDir: "media", mimeTypes: ["image/*"], - adminThumbnail: ({ doc }) => `/media/${doc.src}`, + adminThumbnail: ({ doc }) => `${process.env.PAYLOAD_URL}/media/${doc.src}`, }, fields: [