Media / foldkit-media

What it owns, and what it does not

  • It owns the derivation: which widths are worth offering, what sizes says, which URL each variant has.
  • The original image belongs to its source: a file in your repository, an upload your CMS stores, a third-party host.
  • An image's facts (width, height, alpha, placeholder) are derived from the original once and stored beside it. This package reads them as an ImageAsset; it does not compute them.
  • Variants belong to whoever makes them, a CDN or a resizing server, and are a cache: they can be made again from the original.
  • Which variant a page shows is the browser's choice, from srcset and sizes. Nothing in your Model decides it.