Media / foldkit-media

Ownership of images, variants, and files

  • This package owns the markup derivation: which widths to offer, what sizes says, and each variant URL.
  • The original image belongs to its source: a file in your repository, an upload your CMS stores, or a third-party host.
  • An image's facts (width, height, alpha, placeholder) are computed from the original once via describe where an original enters and stored beside it; the view only reads them as an ImageAsset.
  • Variants belong to whoever builds them (your Vite build, a CDN, or the resizing server) and are a cache that can always be rebuilt from the original.
  • An uploaded file (any file, not an image to resize) belongs to FileStore with the facts the upload route recorded; your application decides which row holds it and who may read it (Uploads for any file).
  • Which variant loads is the browser's choice from srcset and sizes; your Model stays free of media queries and chosen widths.
  • An icon's drawing belongs to its SVG set (Lucide or your SVG folder); the build reads and checks it once, and foldkit-mixins theme icon tokens pick which drawing a component renders.