Skip to content

Commit

Permalink
docs: update Image CDN configuration details
Browse files Browse the repository at this point in the history
  • Loading branch information
ArnaudLigny committed Mar 12, 2024
1 parent 2af5184 commit 86d0689
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions docs/4-Configuration.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!--
description: "Configure your website."
date: 2021-05-07
updated: 2024-01-18
updated: 2024-03-12
-->
# Configuration

Expand Down Expand Up @@ -837,23 +837,23 @@ assets:

#### Image CDN

If the option `assets.images.cdn` is enabled then URL of assets will be replaced by the provided CDN `url`.
URL of image assets can be easily replaced by a provided CDN `url`.

```yaml
assets:
images:
cdn:
enabled: false # enables Image CDN (`false` by default)
canonical: true # is `image_url` must be canonical or not (`true` by default)
remote: true # includes remote images (`true` by default)
canonical: true # `image_url` is canonical (instead of a relative path) (`true` by default)
remote: true # handles not local images too (`true` by default)
account: 'xxxx' # provider account
url: 'https://provider.tld/%account%/%image_url%?w=%width%&q=%quality%&format=%format%'
```
`url` is a pattern that contains variables:

- `%account%` replaced by the `assets.images.cdn.account` option
- `%image_url%` replaced by the asset `path` or the URL of the remote image
- `%image_url%` replaced by the image canonical URL or `path`
- `%width%` replaced by the image width
- `%quality%` replaced by the `assets.images.quality` option
- `%format%` replaced by the image format
Expand Down

0 comments on commit 86d0689

Please sign in to comment.