diff --git a/client/lib/feed-post-store/normalization-rules.js b/client/lib/feed-post-store/normalization-rules.js index f8000ba2b18499..bcba1e106c6a9a 100644 --- a/client/lib/feed-post-store/normalization-rules.js +++ b/client/lib/feed-post-store/normalization-rules.js @@ -52,9 +52,9 @@ const fastPostNormalizationRules = [ classifyPost ]; -function discoverFullBleedImages( post, callback ) { +function discoverFullBleedImages( post, dom ) { if ( post.site_ID === DISCOVER_BLOG_ID ) { - const images = toArray( post.__contentDOM.querySelectorAll( '.fullbleed img, img.fullbleed' ) ); + const images = dom.querySelectorAll( '.fullbleed img, img.fullbleed' ); forEach( images, function( image ) { const newSrc = resizeImageUrl( image.src, { w: DISCOVER_FULL_BLEED_WIDTH } ); let oldImageObject = find( post.content_images, { src: image.src } ); @@ -62,7 +62,7 @@ function discoverFullBleedImages( post, callback ) { image.src = newSrc; } ); } - callback(); + return post; } /** diff --git a/client/lib/post-normalizer/rule-wait-for-images-to-load.js b/client/lib/post-normalizer/rule-wait-for-images-to-load.js index 722b1857d275cc..acd4f94c08157a 100644 --- a/client/lib/post-normalizer/rule-wait-for-images-to-load.js +++ b/client/lib/post-normalizer/rule-wait-for-images-to-load.js @@ -2,6 +2,7 @@ * External Dependencies */ import filter from 'lodash/filter'; +import find from 'lodash/find'; import flow from 'lodash/flow'; import forEach from 'lodash/forEach'; import map from 'lodash/map';