@decocms/apps 1.6.2 → 1.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -100,7 +100,12 @@ export function getOptimizedMediaUrl(opts: OptimizationOptions): string {
|
|
|
100
100
|
return optimizeShopify(originalSrc, width, height);
|
|
101
101
|
}
|
|
102
102
|
|
|
103
|
-
|
|
103
|
+
let imageSource = originalSrc.replace(DECO_CACHE_URL, "").replace(S3_URL, "").split("?")[0];
|
|
104
|
+
|
|
105
|
+
// Already on the image CDN — strip the host so we don't proxy through ourselves.
|
|
106
|
+
if (imageSource.startsWith(`https://${imageCdnDomain}/`)) {
|
|
107
|
+
imageSource = imageSource.slice(`https://${imageCdnDomain}`.length);
|
|
108
|
+
}
|
|
104
109
|
|
|
105
110
|
const params = new URLSearchParams();
|
|
106
111
|
params.set("fit", fit);
|