Skip to content

Commit 44f6452

Browse files
committed
A bit more info on asset indexing
1 parent 216f5bc commit 44f6452

File tree

1 file changed

+22
-3
lines changed

1 file changed

+22
-3
lines changed

docs/5.x/reference/element-types/assets.md

+22-3
Original file line numberDiff line numberDiff line change
@@ -160,13 +160,32 @@ You can automatically organize assets when they are uploaded via an [assets fiel
160160

161161
## Updating Asset Indexes
162162

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 <Journey path="Utilities, Asset Indexes" />, or using the [`index-assets` console commands](../cli.md#index-assets):
164164

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.
166185

167186
## Image Transforms
168187

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).
170189

171190
## Image Editor
172191

0 commit comments

Comments
 (0)