@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.
@@ -10830,6 +10830,26 @@ function getImage(entry, width = 0, height = 0, format = "match", fastMode = fal
10830
10830
  }
10831
10831
  return null;
10832
10832
  }
10833
+ function getEntryCardImageRawUrl(obj) {
10834
+ if (typeof obj === "string") {
10835
+ return getEntryImageRawUrl(obj);
10836
+ }
10837
+ let meta;
10838
+ if (typeof obj.json_metadata === "object") {
10839
+ meta = obj.json_metadata;
10840
+ } else {
10841
+ try {
10842
+ meta = JSON.parse(obj.json_metadata);
10843
+ } catch (e) {
10844
+ meta = null;
10845
+ }
10846
+ }
10847
+ const thumbnail = firstMetaUrl(meta?.thumbnails);
10848
+ if (thumbnail) {
10849
+ return decodeImageSrc(thumbnail);
10850
+ }
10851
+ return getEntryImageRawUrl(obj);
10852
+ }
10833
10853
  function getEntryImageRawUrl(obj) {
10834
10854
  if (typeof obj === "string") {
10835
10855
  const src = findFirstImageUrl(obj, true);
@@ -10981,6 +11001,6 @@ function getPostBodySummary(obj, length, platform) {
10981
11001
  return res;
10982
11002
  }
10983
11003
 
10984
- export { IMAGE_SIZES, SECTION_LIST, buildPictureSources, buildSrcSet, buildSrcSetForFormat, catchPostImage, getEntryImageRawUrl, isAllowedEmbedSrc, isLegacySizedProxyUrl, isPictureEligibleRawUrl, isValidPermlink, getPostBodySummary as postBodySummary, proxifyImageSrc, markdown2Html as renderPostBody, setCacheSize, setProxyBase, setSlowRenderThresholdMs, simpleMarkdownToHTML };
11004
+ export { IMAGE_SIZES, SECTION_LIST, buildPictureSources, buildSrcSet, buildSrcSetForFormat, catchPostImage, getEntryCardImageRawUrl, getEntryImageRawUrl, isAllowedEmbedSrc, isLegacySizedProxyUrl, isPictureEligibleRawUrl, isValidPermlink, getPostBodySummary as postBodySummary, proxifyImageSrc, markdown2Html as renderPostBody, setCacheSize, setProxyBase, setSlowRenderThresholdMs, simpleMarkdownToHTML };
10985
11005
  //# sourceMappingURL=index.mjs.map
10986
11006
  //# sourceMappingURL=index.mjs.map