@googleforcreators/media
Version:
Functionality for creating and working with media resources in the Web Stories editor.
3 lines (2 loc) • 303 B
JavaScript
function o({src:o,srcset:r,width:e,height:n}){return new Promise(((s,i)=>{const c=new window.Image(e?Number(e):void 0,n?Number(n):void 0);c.onload=()=>s(c),c.onerror=i,c.decoding="async",c.crossOrigin="anonymous",r&&(c.srcset=r),c.src=o}))}export{o as default};
//# sourceMappingURL=preloadImage.js.map