text4u
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

assets.php 7.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213
  1. <?php
  2. return [
  3. 'image_manipulation' => [
  4. /*
  5. |--------------------------------------------------------------------------
  6. | Route Prefix
  7. |--------------------------------------------------------------------------
  8. |
  9. | The route prefix for serving HTTP based manipulated images through Glide.
  10. | If using the cached option, this should be the URL of the cached path.
  11. |
  12. */
  13. 'route' => 'img',
  14. /*
  15. |--------------------------------------------------------------------------
  16. | Require Glide security token
  17. |--------------------------------------------------------------------------
  18. |
  19. | With this option enabled, you are protecting your website from mass image
  20. | resize attacks. You will need to generate tokens using the Glide tag
  21. | but may want to disable this while in development to tinker.
  22. |
  23. */
  24. 'secure' => true,
  25. /*
  26. |--------------------------------------------------------------------------
  27. | Image Manipulation Driver
  28. |--------------------------------------------------------------------------
  29. |
  30. | The driver that will be used under the hood for image manipulation.
  31. | Supported: "gd" or "imagick" (if installed on your server)
  32. |
  33. */
  34. 'driver' => 'gd',
  35. /*
  36. |--------------------------------------------------------------------------
  37. | Additional Image Extensions
  38. |--------------------------------------------------------------------------
  39. |
  40. | Define any additional image file extensions you would like Statamic to
  41. | process. You should ensure that both your server and the selected
  42. | image manipulation driver properly supports these extensions.
  43. |
  44. */
  45. 'additional_extensions' => [
  46. // 'heic',
  47. ],
  48. /*
  49. |--------------------------------------------------------------------------
  50. | Save Cached Images
  51. |--------------------------------------------------------------------------
  52. |
  53. | Enabling this will make Glide save publicly accessible images. It will
  54. | increase performance at the cost of the dynamic nature of HTTP based
  55. | image manipulation. You will need to invalidate images manually.
  56. |
  57. */
  58. 'cache' => false,
  59. 'cache_path' => public_path('img'),
  60. /*
  61. |--------------------------------------------------------------------------
  62. | Image Manipulation Defaults
  63. |--------------------------------------------------------------------------
  64. |
  65. | You may define global defaults for all manipulation parameters, such as
  66. | quality, format, and sharpness. These can and will be be overwritten
  67. | on the tag parameter level as well as the preset level.
  68. |
  69. */
  70. 'defaults' => [
  71. // 'quality' => 50,
  72. ],
  73. /*
  74. |--------------------------------------------------------------------------
  75. | Image Manipulation Presets
  76. |--------------------------------------------------------------------------
  77. |
  78. | Rather than specifying your manipulation params in your templates with
  79. | the glide tag, you may define them here and reference their handles.
  80. | They may also be automatically generated when you upload assets.
  81. | Containers can be configured to warm these caches on upload.
  82. |
  83. */
  84. 'presets' => [
  85. // 'small' => ['w' => 200, 'h' => 200, 'q' => 75, 'fit' => 'crop'],
  86. ],
  87. /*
  88. |--------------------------------------------------------------------------
  89. | Generate Image Manipulation Presets on Upload
  90. |--------------------------------------------------------------------------
  91. |
  92. | By default, presets will be automatically generated on upload, ensuring
  93. | the cached images are available when they are first used. You may opt
  94. | out of this behavior here and have the presets generated on demand.
  95. |
  96. */
  97. 'generate_presets_on_upload' => true,
  98. /*
  99. |--------------------------------------------------------------------------
  100. | Append Original Filename
  101. |--------------------------------------------------------------------------
  102. |
  103. | Append the original filename to Glide generated URLs.
  104. | This helps with Search Engine Optimization.
  105. |
  106. */
  107. 'append_original_filename' => true,
  108. ],
  109. /*
  110. |--------------------------------------------------------------------------
  111. | Auto-Crop Assets
  112. |--------------------------------------------------------------------------
  113. |
  114. | Enabling this will make Glide automatically crop assets at their focal
  115. | point (which is the center if no focal point is defined). Otherwise,
  116. | you will need to manually add any crop related parameters.
  117. |
  118. */
  119. 'auto_crop' => true,
  120. /*
  121. |--------------------------------------------------------------------------
  122. | Control Panel Thumbnail Restrictions
  123. |--------------------------------------------------------------------------
  124. |
  125. | Thumbnails will not be generated for any assets any larger (in either
  126. | axis) than the values listed below. This helps prevent memory usage
  127. | issues out of the box. You may increase or decrease as necessary.
  128. |
  129. */
  130. 'thumbnails' => [
  131. 'max_width' => 10000,
  132. 'max_height' => 10000,
  133. ],
  134. /*
  135. |--------------------------------------------------------------------------
  136. | File Previews with Google Docs
  137. |--------------------------------------------------------------------------
  138. |
  139. | Filetypes that cannot be rendered with HTML5 can opt into the Google Docs
  140. | Viewer. Google will get temporary access to these files so keep that in
  141. | mind for any privacy implications: https://policies.google.com/privacy
  142. |
  143. */
  144. 'google_docs_viewer' => false,
  145. /*
  146. |--------------------------------------------------------------------------
  147. | Cache Metadata
  148. |--------------------------------------------------------------------------
  149. |
  150. | Asset metadata (filesize, dimensions, custom data, etc) will get cached
  151. | to optimize performance, so that it will not need to be constantly
  152. | re-evaluated from disk. You may disable this option if you are
  153. | planning to continually modify the same asset repeatedly.
  154. |
  155. */
  156. 'cache_meta' => true,
  157. /*
  158. |--------------------------------------------------------------------------
  159. | Focal Point Editor
  160. |--------------------------------------------------------------------------
  161. |
  162. | When editing images in the Control Panel, there is an option to choose
  163. | a focal point. When working with third-party image providers such as
  164. | Cloudinary it can be useful to disable Statamic's built-in editor.
  165. |
  166. */
  167. 'focal_point_editor' => true,
  168. /*
  169. |--------------------------------------------------------------------------
  170. | Enforce Lowercase Filenames
  171. |--------------------------------------------------------------------------
  172. |
  173. | Control whether asset filenames will be converted to lowercase when
  174. | uploading and renaming. This can help you avoid file conflicts
  175. | when working in case-insensitive filesystem environments.
  176. |
  177. */
  178. 'lowercase' => true,
  179. ];