Skip to content

Image Orientation Criterion

The Orientation Search Criterion searches for image with specified orientation(s). Supported orientation values: landscape, portrait and square.

Arguments

  • fielDefIdentifier - string representing the identifier of the field
  • orientation - strings representing orientations

Example

PHP

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
$query->query = new Criterion\Orientation('image', 'landscape');

OR

$orientations = [
    'landscape',
    'portrait',
];

$query->query = new Criterion\Orientation('image', $orientations);

REST API

1
2
3
4
5
6
7
8
<Query>
    <Filter>
        <ImageOrientationCriterion>
            <fieldDefIdentifier>image</fieldDefIdentifier>
            <orientation>landscape</orientation>
        </ImageOrientationCriterion>
    </Filter>
</Query>
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
"Query": {
    "Filter": {
        "ImageOrientationCriterion": {
            "fieldDefIdentifier": "image",
            "orientation": "landscape"
        }
    }
}

OR

"Query": {
    "Filter": {
        "ImageOrientationCriterion": {
            "fieldDefIdentifier": "image",
            "orientation": ["portrait", "landscape"]
        }
    }
}