@quintype/seo 1.49.3-article-image-array-schema.0 → 1.49.3-article-image-array-schema.1
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.cjs.js
CHANGED
|
@@ -687,9 +687,9 @@ function generateArticleData(structuredData = {}, story = {}, publisherConfig =
|
|
|
687
687
|
function generateArticleHeroImageData(image, publisherConfig = {}, imageMetadata = {}) {
|
|
688
688
|
const imageWidth = 1200;
|
|
689
689
|
const imageHeights = [675, 900, 1200];
|
|
690
|
-
const
|
|
690
|
+
const hasFocusPoint = get__default["default"](imageMetadata, ["focus-point"], null);
|
|
691
691
|
|
|
692
|
-
const focusedImage =
|
|
692
|
+
const focusedImage = hasFocusPoint ? new quintypeJs.FocusedImage(image, imageMetadata) : null;
|
|
693
693
|
|
|
694
694
|
return imageHeights.map(height => {
|
|
695
695
|
let croppedImage = "";
|
|
@@ -702,9 +702,13 @@ function generateArticleHeroImageData(image, publisherConfig = {}, imageMetadata
|
|
|
702
702
|
auto: "format,compress",
|
|
703
703
|
fit: "crop"
|
|
704
704
|
});
|
|
705
|
-
path
|
|
706
|
-
|
|
707
|
-
|
|
705
|
+
croppedImage = `${imageSrc}/${path}`;
|
|
706
|
+
console.log("focusedImage ----------->>>", {
|
|
707
|
+
hasFocusPoint,
|
|
708
|
+
focusedImage,
|
|
709
|
+
path,
|
|
710
|
+
croppedImage
|
|
711
|
+
});
|
|
708
712
|
}
|
|
709
713
|
const finalUrl = focusedImage ? croppedImage : imageUrl(publisherConfig, image, imageWidth, height);
|
|
710
714
|
return Object.assign({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quintype/seo",
|
|
3
|
-
"version": "1.49.3-article-image-array-schema.
|
|
3
|
+
"version": "1.49.3-article-image-array-schema.1",
|
|
4
4
|
"description": "SEO Modules for Quintype",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"repository": "https://github.com/quintype/quintype-node-seo",
|
|
@@ -135,9 +135,9 @@ function generateArticleData(structuredData = {}, story = {}, publisherConfig =
|
|
|
135
135
|
function generateArticleHeroImageData(image, publisherConfig = {}, imageMetadata = {}) {
|
|
136
136
|
const imageWidth = 1200;
|
|
137
137
|
const imageHeights = [675, 900, 1200];
|
|
138
|
-
const
|
|
138
|
+
const hasFocusPoint = get(imageMetadata, ["focus-point"], null);
|
|
139
139
|
|
|
140
|
-
const focusedImage =
|
|
140
|
+
const focusedImage = hasFocusPoint ? new FocusedImage(image, imageMetadata) : null;
|
|
141
141
|
|
|
142
142
|
return imageHeights.map((height) => {
|
|
143
143
|
let croppedImage = "";
|
|
@@ -152,9 +152,13 @@ function generateArticleHeroImageData(image, publisherConfig = {}, imageMetadata
|
|
|
152
152
|
auto: "format,compress",
|
|
153
153
|
fit: "crop",
|
|
154
154
|
});
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
155
|
+
croppedImage = `${imageSrc}/${path}`;
|
|
156
|
+
console.log("focusedImage ----------->>>", {
|
|
157
|
+
hasFocusPoint,
|
|
158
|
+
focusedImage,
|
|
159
|
+
path,
|
|
160
|
+
croppedImage,
|
|
161
|
+
});
|
|
158
162
|
}
|
|
159
163
|
const finalUrl = focusedImage ? croppedImage : imageUrl(publisherConfig, image, imageWidth, height);
|
|
160
164
|
return Object.assign(
|