diy-template-components 0.2.38 → 0.2.39

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