Improve CMS media uploads and admin styling

This commit is contained in:
2026-09-18 00:40:20 +02:00
parent 1970be29e7
commit caa24905ec
7 changed files with 214 additions and 23 deletions
+4 -3
View File
@@ -14,7 +14,7 @@ export const Media: CollectionConfig = {
admin: {
group: "Inhalte",
useAsTitle: "alt",
description: "Bilder für die Website - Alt-Text ist für Barrierefreiheit und SEO Pflicht.",
description: "Bilder für die Website. Alt-Text und Bildbeschreibung sind optional. Bis zu 100 Dateien pro Upload.",
},
access: {
// Images are public so the website can display them without a login.
@@ -25,6 +25,7 @@ export const Media: CollectionConfig = {
},
upload: {
staticDir: path.resolve(dirname, "..", "media"),
bulkUpload: true,
// SVG deliberately excluded: it can carry inline <script>/event-handler
// payloads that execute if the raw file is ever opened directly (not via
// <img>) - not currently needed by any part of the site.
@@ -42,9 +43,9 @@ export const Media: CollectionConfig = {
name: "alt",
type: "text",
label: "Alt-Text",
required: true,
required: false,
admin: {
description: "Kurze Beschreibung des Bildes für Screenreader und Suchmaschinen.",
description: "Optional. Kann später für Barrierefreiheit und SEO ergänzt werden.",
},
},
{