diff --git a/packages/gatsby-plugin-image/src/components/layout-wrapper.tsx b/packages/gatsby-plugin-image/src/components/layout-wrapper.tsx index b0155f95f6199..6643a03157154 100644 --- a/packages/gatsby-plugin-image/src/components/layout-wrapper.tsx +++ b/packages/gatsby-plugin-image/src/components/layout-wrapper.tsx @@ -34,6 +34,9 @@ if (hasNativeLazyLoadSupport) { if (mainImage.complete) { mainImage.style.opacity = 1; + + // also hide the placeholder + mainImage.parentNode.parentNode.querySelector('[data-placeholder-image]').style.opacity = 0; } } }