Files
payloadcms/test/_community/collections/Media/index.ts
2024-03-08 11:09:59 -05:00

34 lines
615 B
TypeScript

import type { CollectionConfig } from '../../../../packages/payload/src/collections/config/types.js'
export const mediaSlug = 'media'
export const MediaCollection: CollectionConfig = {
slug: mediaSlug,
upload: {
crop: true,
focalPoint: true,
imageSizes: [
{
name: 'thumbnail',
width: 200,
height: 200,
},
{
name: 'medium',
width: 800,
height: 800,
},
{
name: 'large',
width: 1200,
height: 1200,
},
],
},
access: {
read: () => true,
create: () => true,
},
fields: [],
}