-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGetMediaImage.graphql
64 lines (57 loc) · 1.54 KB
/
GetMediaImage.graphql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# Loads a media resource of type MediaImage.
query getMediaImage($id: ID!) {
# Use the mediaResource() to load MediaImage types
mediaResource(
# Supply your Media Resource ID
id: $id
) {
# In this query, we are accessing the image
... on MediaImage {
# Select a thumbnail from the image sources, based on the bestFit strategy
thumbnail: source(bestFit: [100, 50]) {
url
}
card: source(bestFit: [600, 400]) {
url
}
# ... create more sizes you want to access here
# Tags
tags
# Image credits
copyright
attribution
# More detailed attribution
attributionUrl: attrValue(id: "attribution-url")
attributionHtml: attrValue(id: "attribution-html")
photographer: attrValue(id: "photographer")
usageTerms: attrValue(id: "usage-terms")
licenseUrl: attrValue(id: "license-url")
licenseShortName: attrValue(id: "license-short-name")
# Accessing alternative text
caption
altText
# Original Size Information ([w,h])
originalSize
# Accessing EXIF information if found for the supplied photo
# Access all using the field "exifIds"
make: exif(id: "make") {
value
}
model: exif(id: "model") {
value
}
focalLength: exif(id: "focalLength") {
value
}
exposureTime: exif(id: "exposureTime") {
value
}
aperture: exif(id: "aperture") {
value
}
iso: exif(id: "iso") {
value
}
}
}
}