Media / foldkit-media/unpic
detect
function · packages/media/src/unpic/index.ts:34
function detect(url: string, options?: DetectOptions): Option.Option<Provider>The provider of url's host, or none when unpic knows no host for it. The
provider answers only for an asset on that same host (its key is the
image's URL), and none for a format the host does not take: unpic writes no
format for some hosts (Shopify's chooses from Accept), and a source
naming AVIF over a JPEG would be a lie.