Skip to content

Commit 3c18589

Browse files
Merge pull request #368 from commerce-docs/byo-cdn-reference
Clarify CDN details for PaaS vs SaaS
2 parents 365dabf + 9dbcb91 commit 3c18589

File tree

2 files changed

+42
-8
lines changed

2 files changed

+42
-8
lines changed

src/content/docs/sdk/reference/initializer.mdx

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ title: Initializer
33
description: Initializer is a class that helps you initialize your package.
44
---
55

6+
import Aside from '@components/Aside.astro';
7+
import Badge from '@components/overrides/Badge.astro';
8+
69
```typescript
710
// my-domain-package/initializer.ts
811

@@ -41,12 +44,34 @@ window.addEventListener('load', initializers.mount);
4144

4245
## `setImageParamKeys(params)`
4346

44-
The `setImageParamKeys` method is part of the initializers module in the `@dropins/tools` package.
45-
It allows you to set image parameters globally for all drop-ins that use the Image component.
47+
The `setImageParamKeys` method is part of the initializers module in the `@dropins/tools` package. It allows you to set image parameters globally for all drop-in components that use the [Image](/sdk/components/image/) component. CDN-based image optimization services, such as Fastly and Cloudflare, rely on these parameters to optimize images.
48+
49+
### Default behavior
50+
51+
Since Fastly is the default CDN for Adobe Commerce on Cloud, drop-in components add the following Fastly-style parameters to all image URLs by default:
52+
53+
- `width`
54+
- `height`
55+
- `auto`
56+
- `quality`
57+
- `crop`
58+
- `fit`
59+
60+
Example:
61+
62+
```text
63+
/media/catalog/product/adobestoredata/ADB150.jpg?auto=webp&quality=80&crop=false&fit=cover&width=960&height=1191`
64+
```
65+
66+
Technical details about CDN-based image optimization differ depending on your backend Adobe Commerce solution:
4667

47-
### Default Behavior
68+
- <Badge tooltip="Applies to Adobe Commerce on Cloud projects (Adobe-managed PaaS infrastructure) and on-premises projects only." text="PaaS only" variant="note" href="https://experienceleague.adobe.com/en/docs/commerce/user-guides/product-solutions" /> Fastly is the default CDN-based image optimization service for Adobe Commerce on Cloud projects. Fastly-style parameters are used by default unless overridden via `setImageParamKeys`.
69+
70+
- <Badge tooltip="Applies to Adobe Commerce as a Cloud Service and Adobe Commerce Optimizer projects only (Adobe-managed SaaS infrastructure)." text="SaaS only" variant="success" href="https://experienceleague.adobe.com/en/docs/commerce/user-guides/product-solutions" /> Cloudflare is the default CDN-based image optimization service for Adobe Commerce as a Cloud Service and Adobe Commerce Optimizer projects. Fastly-style parameters are used but are proxied through a [Cloudflare Worker](https://developers.cloudflare.com/images/transform-images/transform-via-workers) to transform the parameters to Cloudflare-style parameters. Overriding the default parameters using `setImageParamKeys` may interfere with the proxy transformation and lead to unexpected results.
4871

49-
By default, Fastly parameters are used if `setImageParamKeys` is not called or if no parameters are provided.
72+
<Aside type="tip" title="Override defaults">
73+
If necessary, you can override these parameters with the `setImageParamKeys` method. For example, if you are using a CDN provider that requires different parameters or URL patterns.
74+
</Aside>
5075

5176
### Parameters
5277

src/content/docs/setup/configuration/content-delivery-network.mdx

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,27 @@
11
---
22
title: Content delivery network (CDN)
3-
description: Learn how to configure a CDN for your Adobe Commerce on Edge Delivery Services storefront project.
3+
description: Learn how to configure a CDN for your Commerce Storefront powered by Edge Delivery Services.
44
---
55

6+
import Aside from '@components/Aside.astro';
67
import Badge from '@components/overrides/Badge.astro';
78
import { Tabs, TabItem, Steps } from '@astrojs/starlight/components';
89
import Task from '@components/Task.astro';
910
import Tasks from '@components/Tasks.astro';
1011

11-
Decide early which CDN to use. A popular option is Fastly, which is included with your Adobe Commerce license.
12+
A CDN is a critical component of your Commerce Storefront. It is responsible for delivering content to your customers in the most efficient and secure way possible.
1213

13-
<Badge tooltip="Applies to Adobe Commerce on Cloud projects (Adobe-managed PaaS infrastructure) and on-premises projects only." text="PaaS only" variant="note" href="https://experienceleague.adobe.com/en/docs/commerce/user-guides/product-solutions" />
14+
CDN features, usage, and provider details vary depending on your backend commerce implementation. By default, Adobe Commerce on Cloud projects use Fastly, while Adobe Commerce as a Cloud Service and Adobe Commerce Optimizer projects use a fully managed CDN service through [Adobe Experience Manager](https://experienceleague.adobe.com/en/docs/experience-manager-cloud-service/content/implementing/content-delivery/cdn).
1415

15-
This page provides instructions and guidance for configuring Adobe Commerce with Fastly. It focuses on routing use cases, configuration, validation, and debugging.
16+
If necessary, you can configure your own CDN, also known as "Bring Your Own CDN" (BYO CDN). See [BYO CDN Setup](https://www.aem.live/docs/byo-cdn-setup) for required settings and vendor-specific setup instructions.
17+
18+
<Aside type="note" title="Image optimization">
19+
Drop-in components automatically add image optimization parameters (such as width, height, and quality) to image URLs. CDN-based image optimization services rely on these parameters to optimize images. If you need to use different parameters or URL patterns for your CDN provider, you can override the defaults by using the [`setImageParamKeys`](/sdk/reference/initializer/#setimageparamkeysparams) method in the initializer configuration.
20+
</Aside>
21+
22+
<Badge tooltip="Applies to Adobe Commerce on Cloud projects (Adobe-managed PaaS infrastructure) and on-premises projects only." text="PaaS only" variant="note" href="https://experienceleague.adobe.com/en/docs/commerce/user-guides/product-solutions" /> For Adobe Commerce on Cloud projects, Fastly is included with your Adobe Commerce license and is the default CDN provider. The [`fastly-magento2`](https://github.com/fastly/fastly-magento2) module exposes Fastly service configurations in the Commerce Admin.
23+
24+
The remaining sections on this page provide instructions and guidance for configuring Adobe Commerce on Cloud projects with the Fastly module. It focuses on routing use cases, configuration, validation, and debugging.
1625

1726
## Routing
1827

0 commit comments

Comments
 (0)