forked from statamic/cms
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathassets.php
201 lines (169 loc) · 7.05 KB
/
assets.php
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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
<?php
return [
'image_manipulation' => [
/*
|--------------------------------------------------------------------------
| Route Prefix
|--------------------------------------------------------------------------
|
| The route prefix for serving HTTP based manipulated images through Glide.
| If using the cached option, this should be the URL of the cached path.
|
*/
'route' => 'img',
/*
|--------------------------------------------------------------------------
| Require Glide security token
|--------------------------------------------------------------------------
|
| With this option enabled, you are protecting your website from mass image
| resize attacks. You will need to generate tokens using the Glide tag
| but may want to disable this while in development to tinker.
|
*/
'secure' => true,
/*
|--------------------------------------------------------------------------
| Image Manipulation Driver
|--------------------------------------------------------------------------
|
| The driver that will be used under the hood for image manipulation.
| Supported: "gd" or "imagick" (if installed on your server)
|
*/
'driver' => 'gd',
/*
|--------------------------------------------------------------------------
| Additional Image Extensions
|--------------------------------------------------------------------------
|
| Define any additional image file extensions you would like Statamic to
| process. You should ensure that both your server and the selected
| image manipulation driver properly supports these extensions.
|
*/
'additional_extensions' => [
// 'heic',
],
/*
|--------------------------------------------------------------------------
| Save Cached Images
|--------------------------------------------------------------------------
|
| Enabling this will make Glide save publicly accessible images. It will
| increase performance at the cost of the dynamic nature of HTTP based
| image manipulation. You will need to invalidate images manually.
|
*/
'cache' => false,
'cache_path' => public_path('img'),
/*
|--------------------------------------------------------------------------
| Image Manipulation Defaults
|--------------------------------------------------------------------------
|
| You may define global defaults for all manipulation parameters, such as
| quality, format, and sharpness. These can and will be be overwritten
| on the tag parameter level as well as the preset level.
|
*/
'defaults' => [
// 'quality' => 50,
],
/*
|--------------------------------------------------------------------------
| Image Manipulation Presets
|--------------------------------------------------------------------------
|
| Rather than specifying your manipulation params in your templates with
| the glide tag, you may define them here and reference their handles.
| They may also be automatically generated when you upload assets.
| Containers can be configured to warm these caches on upload.
|
*/
'presets' => [
// 'small' => ['w' => 200, 'h' => 200, 'q' => 75, 'fit' => 'crop'],
],
/*
|--------------------------------------------------------------------------
| Generate Image Manipulation Presets on Upload
|--------------------------------------------------------------------------
|
| By default, presets will be automatically generated on upload, ensuring
| the cached images are available when they are first used. You may opt
| out of this behavior here and have the presets generated on demand.
|
*/
'generate_presets_on_upload' => true,
],
/*
|--------------------------------------------------------------------------
| Auto-Crop Assets
|--------------------------------------------------------------------------
|
| Enabling this will make Glide automatically crop assets at their focal
| point (which is the center if no focal point is defined). Otherwise,
| you will need to manually add any crop related parameters.
|
*/
'auto_crop' => true,
/*
|--------------------------------------------------------------------------
| Control Panel Thumbnail Restrictions
|--------------------------------------------------------------------------
|
| Thumbnails will not be generated for any assets any larger (in either
| axis) than the values listed below. This helps prevent memory usage
| issues out of the box. You may increase or decrease as necessary.
|
*/
'thumbnails' => [
'max_width' => 10000,
'max_height' => 10000,
],
/*
|--------------------------------------------------------------------------
| File Previews with Google Docs
|--------------------------------------------------------------------------
|
| Filetypes that cannot be rendered with HTML5 can opt into the Google Docs
| Viewer. Google will get temporary access to these files so keep that in
| mind for any privacy implications: https://policies.google.com/privacy
|
*/
'google_docs_viewer' => false,
/*
|--------------------------------------------------------------------------
| Cache Metadata
|--------------------------------------------------------------------------
|
| Asset metadata (filesize, dimensions, custom data, etc) will get cached
| to optimize performance, so that it will not need to be constantly
| re-evaluated from disk. You may disable this option if you are
| planning to continually modify the same asset repeatedly.
|
*/
'cache_meta' => true,
/*
|--------------------------------------------------------------------------
| Focal Point Editor
|--------------------------------------------------------------------------
|
| When editing images in the Control Panel, there is an option to choose
| a focal point. When working with third-party image providers such as
| Cloudinary it can be useful to disable Statamic's built-in editor.
|
*/
'focal_point_editor' => true,
/*
|--------------------------------------------------------------------------
| Enforce Lowercase Filenames
|--------------------------------------------------------------------------
|
| Control whether asset filenames will be converted to lowercase when
| uploading and renaming. This can help you avoid file conflicts
| when working in case-insensitive filesystem environments.
|
*/
'lowercase' => true,
];