@ecency/render-helper 2.5.34 → 2.5.35

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.
@@ -10857,6 +10857,26 @@ function getImage(entry, width = 0, height = 0, format = "match", fastMode = fal
10857
10857
  }
10858
10858
  return null;
10859
10859
  }
10860
+ function getEntryCardImageRawUrl(obj) {
10861
+ if (typeof obj === "string") {
10862
+ return getEntryImageRawUrl(obj);
10863
+ }
10864
+ let meta;
10865
+ if (typeof obj.json_metadata === "object") {
10866
+ meta = obj.json_metadata;
10867
+ } else {
10868
+ try {
10869
+ meta = JSON.parse(obj.json_metadata);
10870
+ } catch (e) {
10871
+ meta = null;
10872
+ }
10873
+ }
10874
+ const thumbnail = firstMetaUrl(meta?.thumbnails);
10875
+ if (thumbnail) {
10876
+ return decodeImageSrc(thumbnail);
10877
+ }
10878
+ return getEntryImageRawUrl(obj);
10879
+ }
10860
10880
  function getEntryImageRawUrl(obj) {
10861
10881
  if (typeof obj === "string") {
10862
10882
  const src = findFirstImageUrl(obj, true);
@@ -11014,6 +11034,7 @@ exports.buildPictureSources = buildPictureSources;
11014
11034
  exports.buildSrcSet = buildSrcSet;
11015
11035
  exports.buildSrcSetForFormat = buildSrcSetForFormat;
11016
11036
  exports.catchPostImage = catchPostImage;
11037
+ exports.getEntryCardImageRawUrl = getEntryCardImageRawUrl;
11017
11038
  exports.getEntryImageRawUrl = getEntryImageRawUrl;
11018
11039
  exports.isAllowedEmbedSrc = isAllowedEmbedSrc;
11019
11040
  exports.isLegacySizedProxyUrl = isLegacySizedProxyUrl;