diy-template-components 0.2.38 → 0.2.40

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/build/index.es.js CHANGED
@@ -1521,13 +1521,13 @@ const NextImageRenderer = ({
1521
1521
  const {
1522
1522
  isCustomWebsite
1523
1523
  } = useContext(PageContext);
1524
-
1525
- // const imageLoader = ({ src, quality }) => {
1526
- // return `${process.env.NEXT_PUBLIC_ENV_ASSET_PREFIX
1527
- // }/_next/image?url=${src}&q=${quality || 75}`;
1528
- // };
1529
-
1530
- const imageUrl = `${process.env.NEXT_PUBLIC_ENV_ASSET_PREFIX}${src}`;
1524
+ const imageLoader = ({
1525
+ src,
1526
+ quality,
1527
+ width
1528
+ }) => {
1529
+ return `${process.env.NEXT_PUBLIC_ENV_ASSET_PREFIX}/_next/image?url=${src}&q=${quality || 75}&w=${width}`;
1530
+ };
1531
1531
  let {
1532
1532
  refSetter,
1533
1533
  className
@@ -1535,7 +1535,8 @@ const NextImageRenderer = ({
1535
1535
  if (isCustomWebsite) {
1536
1536
  const NextImage = require('next/image').default;
1537
1537
  return /*#__PURE__*/React.createElement(NextImage, _extends({
1538
- src: imageUrl,
1538
+ loader: imageLoader,
1539
+ src: src,
1539
1540
  layout: 'fill',
1540
1541
  ref: refSetter,
1541
1542
  className: className