You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/5.x/reference/element-types/assets.md
+22-3
Original file line number
Diff line number
Diff line change
@@ -160,13 +160,32 @@ You can automatically organize assets when they are uploaded via an [assets fiel
160
160
161
161
## Updating Asset Indexes
162
162
163
-
If any files are ever added, modified, or deleted outside of Craft (such as over FTP), you’ll need to tell Craft to update its indexes for the volume. You can do that from **Utilities** → **Asset Indexes**.
163
+
If any files are ever added, modified, or deleted outside of Craft (such as over FTP), you’ll need to tell Craft to update its indexes for the volume. You can do that from <Journeypath="Utilities, Asset Indexes" />, or using the [`index-assets` console commands](../cli.md#index-assets):
164
164
165
-
You will have the option to cache remote images. If you don’t have any remote volumes (Amazon S3, etc.), you can safely ignore it. Enabling the setting will cause the indexing process to take longer to complete, but it will improve the speed of [image transform](../../development/image-transforms.md) generation.
165
+
```bash
166
+
# Re-index all volumes:
167
+
php craft index-assets/all
168
+
169
+
# Re-index a specific volume:
170
+
php craft index-assets/one myVolumeHandle
171
+
172
+
# See available options:
173
+
php craft index-assets/one --help
174
+
```
175
+
176
+
Both tools provide the option to **Cache Remote Images**. If you don’t have any [remote filesystems](#remote-filesystems) (or the volume doesn’t contain any transformable files) you can safely ignore it.
177
+
178
+
::: tip
179
+
Enabling the setting will cause the indexing process to take longer to complete (and may consume a great deal of local disk space), but it can speed up subsequent [image transformations](../../development/image-transforms.md).
180
+
181
+
This option will have limited utility on ephemeral filesystems, as any downloaded images will be erased the next time it is restarted.
182
+
:::
183
+
184
+
Indexing assets is also a quick way to import a preexisting directory of files with Craft: with a fresh [volume](#volumes), drop the files anywhere within its **Base Path**, then index it to create the corresponding asset elements.
166
185
167
186
## Image Transforms
168
187
169
-
Craft provides a way to perform a variety of image transformations to your assets. See [Image Transforms](../../development/image-transforms.md) for more information.
188
+
To help serve optimized images, Craft supports predefined (or “named”) and ad-hoc [image transformations](../../development/image-transforms.md).
0 commit comments