UNPKG

@codefast/image-loader

Version:

Simple, functional image loader for Next.js supporting multiple CDN providers

1 lines 208 B
function t({quality:t=80,src:r,width:e}){try{let n=new URL(r),a=[`${e}x0`,`filters:quality(${t})`],o=`/${a.join("/")}${n.pathname}`;return n.pathname=o,n.toString()}catch{return r}}export{t as thumborLoader};