Skip to content

Commit

Permalink
[TASK] Add specific example for setting cropvariants for a file
Browse files Browse the repository at this point in the history
  • Loading branch information
PKuhlmay committed Oct 17, 2024
1 parent 41cfa23 commit 6a0a16f
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions Documentation/YamlReference/FieldTypes/File/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -141,3 +141,35 @@ Allow media types like audio, video and youtube (or vimeo).
- identifier: media
type: File
allowed: common-media-types
Set specific crop variantes for an image field.

.. code-block:: yaml
name: example/image
fields:
- identifier: image
type: File
allowed: common-image-types
cropVariants:
desktop:
title: Desktop
allowedAspectRatios:
portrait:
title: Portrait
value: 0.75
landscape:
title: Landscape
value: 4 / 3
tablet:
title: Tablet
allowedAspectRatios:
square:
title: Square
value: 0.75
smartphone:
title: Smartphone
allowedAspectRatios:
landscape:
title: Landscape
value: 4 / 3

0 comments on commit 6a0a16f

Please sign in to comment.