@quintype/seo 1.49.3-article-image-array-schema.0 → 1.49.3-article-image-array-schema.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.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,7 @@ function generateArticleHeroImageData(image, publisherConfig = {}, imageMetadata
|
|
|
702
702
|
auto: "format,compress",
|
|
703
703
|
fit: "crop"
|
|
704
704
|
});
|
|
705
|
-
path
|
|
706
|
-
const rectPropsImage = decodeURIComponent(path);
|
|
707
|
-
croppedImage = `${imageSrc}/${rectPropsImage}`;
|
|
705
|
+
croppedImage = `${imageSrc}/${path}`;
|
|
708
706
|
}
|
|
709
707
|
const finalUrl = focusedImage ? croppedImage : imageUrl(publisherConfig, image, imageWidth, height);
|
|
710
708
|
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.2",
|
|
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,7 @@ function generateArticleHeroImageData(image, publisherConfig = {}, imageMetadata
|
|
|
152
152
|
auto: "format,compress",
|
|
153
153
|
fit: "crop",
|
|
154
154
|
});
|
|
155
|
-
|
|
156
|
-
const rectPropsImage = decodeURIComponent(path);
|
|
157
|
-
croppedImage = `${imageSrc}/${rectPropsImage}`;
|
|
155
|
+
croppedImage = `${imageSrc}/${path}`;
|
|
158
156
|
}
|
|
159
157
|
const finalUrl = focusedImage ? croppedImage : imageUrl(publisherConfig, image, imageWidth, height);
|
|
160
158
|
return Object.assign(
|