# media — the Media collection: file names, oversized uploads, placeholders, `` props Building blocks for the project's upload collection (usually `media`) and for your own `` component. The plugin **does not add** a Media collection or a component — the project assembles them from these parts. Everything comes from the main entry `@intecion/ipal-kit`. Related: [storage.md](./storage.md) (R2, `buildImagesConfig`, `MediaPreconnect`, `YouTubeEmbed`), [security.md](./security.md) (`buildUploadSecurityHeaders`). | Export | What it is | Where | |---|---|---| | `normalizeFilenameHook` | `beforeOperation` — cleans the file name | `hooks.beforeOperation` | | `normalizeFilename(name)` | the same function, without the hook | anywhere | | `buildOptimizeUploadHook(options?)` | `beforeOperation` — safety net for oversized files | `hooks.beforeOperation` | | `buildOptimizeUploadField(name?)` | consent checkbox "Optimize this upload" | `fields` | | `buildMediaPlaceholderHook({ field?, size? })` | `beforeOperation` — blur + dominant color | `hooks.beforeOperation` | | `buildMediaPlaceholderField(name?)` | hidden `placeholder` group | `fields` | | `mediaImageProps(resource, options?)` | `next/image` props | `` component | | `videoProps(resource, options?)` | `