- image-filter.schema.json: removeBackground (color/tolerance/fromEdges/edgeBlur/ referenceWidth), dropShadow (color/opacity/blur/offsets/padding/referenceWidth/ canvas/background), flatten; Tippfehler mitchellNetravili -> mitchellNetravali - asset.schema.json: optionaler imageProcessing-Block (access/cachePath/ allowOriginal/defaultFilter/allowedInputTypes/limits/imageFilter) - index.d.ts: passende Interfaces inkl. AssetConfig - Beispiel: examples/server/asset-image-processing.yml, demo-api imageFilter.shadow - validate-schemas.mjs: examples/server-Pattern je Schema
37 lines
1.1 KiB
YAML
37 lines
1.1 KiB
YAML
# Beispiel für einen Asset-Eintrag mit Bildverarbeitung (imageProcessing)
|
|
# (tibi-server, ProjectConfig.assets[]) — validiert gegen schemas/config/asset.schema.json.
|
|
# Hinweis: cachePath muss ein existierendes Verzeichnis ausserhalb des Quellpfads
|
|
# sein; die Ajv-Validierung prueft nur Form und Wertebereiche, keine Dateisystempfade.
|
|
name: product-images
|
|
path: ./media/products
|
|
imageProcessing:
|
|
access: public
|
|
cachePath: ./media-cache/products
|
|
allowOriginal: false
|
|
defaultFilter: shadow
|
|
allowedInputTypes: ["image/jpeg", "image/png", "image/webp"]
|
|
limits:
|
|
maxInputBytes: 26214400
|
|
maxPixels: 20000000
|
|
imageFilter:
|
|
shadow:
|
|
- width: 800
|
|
outputType: png
|
|
removeBackground:
|
|
color: "#FFFFFF"
|
|
tolerance: 8
|
|
fromEdges: true
|
|
edgeBlur: 1.5
|
|
referenceWidth: 1000
|
|
dropShadow:
|
|
color: "#000000"
|
|
opacity: 0.25
|
|
blur: 15
|
|
offsetX: 8
|
|
offsetY: 8
|
|
padding: 20
|
|
referenceWidth: 1000
|
|
canvas: expand
|
|
background: transparent
|
|
flatten: "#FFFFFF"
|