-
Notifications
You must be signed in to change notification settings - Fork 52
/
images.config.js
108 lines (101 loc) · 2.89 KB
/
images.config.js
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
export default {
settings: {
// Move files to the trash instead of deleting them directly, when using the
// "recreate" or "remove" argument
useTrash: false
},
collections: [
// Slider Images 1
{
/* A name to identify the collection */
name: "Slider images 1",
/* The source directory in which the script is looking for image files */
source: "./src/images/slides",
/* Define if the resizing should include files in subdirectories */
recursive: false,
/* The sizes to create */
sizes: [
{
/* The name of the size, to identify it in case of errors */
name: "Desktop Resolution",
/* The width of the new image */
width: 1110,
/* The height of the new image */
height: 547,
/*
* Define the method by which the image should fit (default: cover)
*
* cover: Crop to cover both provided dimensions.
* contain: Embed within both provided dimensions.
* fill: Ignore the aspect ratio of the input and stretch to both provided dimensions.
* inside: Preserving aspect ratio, resize the image to be as large as possible while
* ensuring its dimensions are less than or equal to both those specified.
* outside: Preserving aspect ratio, resize the image to be as small as possible while
* ensuring its dimensions are greater than or equal to both those specified.
*/
fit: "cover",
/*
* Define the position When using a fit of "cover" or "contain" (default: center).
*
* left
* right
* top
* bottom
* center
* left top
* right top
* left bottom
* right bottom
*/
position: "center"
},
{
name: "Tablet Resolution",
width: 690,
height: 280
},
{
name: "Smartphone Resolution",
width: 510,
height: 207
}
// {
// name: "Changed width only",
// width: 510
// },
// {
// name: "Changed height only",
// height: 207
// },
// {
// name: "Centered square",
// width: 100,
// height: 100
// }
]
},
// Album Images
{
name: "Album images",
source: "./src/images/album",
recursive: false,
sizes: [
{
name: "Desktop Resolution",
width: 255,
height: 255
},
{
name: "Tablet Resolution",
width: 210,
height: 210
},
{
name: "Smartphone Resolution",
width: 510,
height: 510
}
]
}
]
}