Skip to content

Instantly share code, notes, and snippets.

@mficzel
Created May 28, 2019 07:54
Show Gist options
  • Save mficzel/99781d43fb26285e8dee0a806625ca7e to your computer and use it in GitHub Desktop.
Save mficzel/99781d43fb26285e8dee0a806625ca7e to your computer and use it in GitHub Desktop.
Image Variants Configuration for Neos 4.3
Neos:
Media:
# show Variants tab in the inspector
Browser:
features:
variantsTab:
enable: true
# define Variant presets
variantPresets:
'Flownative.Demo:Preset1':
label: 'Demo Preset 1'
mediaTypePatterns: ['~image/(jpe?g|png)~', '~image/vnd\.adobe\.photoshop~']
variants:
'wide':
label: 'Wide'
description: 'An optional description'
icon: ''
adjustments:
crop:
type: 'Neos\Media\Domain\Model\Adjustment\CropImageAdjustment'
options:
aspectRatio: "1:3"
'lowerRight':
label: 'Lower Right'
description: ''
icon: ''
adjustments:
crop:
type: 'Neos\Media\Domain\Model\Adjustment\CropImageAdjustment'
options:
aspectRatio: "3:1"
'square':
label: 'Square'
description: ''
icon: ''
adjustments:
crop:
type: 'Neos\Media\Domain\Model\Adjustment\CropImageAdjustment'
options:
aspectRatio: "1:1"
# Automatically create asset variants for configured presets when assets are added
autoCreateImageVariantPresets: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment