@fayz-ai/shop 0.14.0 → 0.14.2

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.
package/dist/index.js CHANGED
@@ -2351,7 +2351,8 @@ function imageVariantUrl(url, options = {}) {
2351
2351
  const params = new URLSearchParams();
2352
2352
  if (options.width) params.set("width", String(Math.round(options.width)));
2353
2353
  if (options.height) params.set("height", String(Math.round(options.height)));
2354
- if (options.resize) params.set("resize", options.resize);
2354
+ const resize = options.resize ?? (options.width && options.height ? void 0 : "contain");
2355
+ if (resize) params.set("resize", resize);
2355
2356
  params.set("quality", String(clampQuality(options.quality ?? 80)));
2356
2357
  if (options.format) params.set("format", options.format);
2357
2358
  return `${storageBase}/render/image/public/${objectPath}?${params.toString()}`;