Media / foldkit-media
Ownership of images, variants, and files
- This package owns the markup derivation: which widths to offer, what
sizessays, 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 viadescribewhere an original enters and stored beside it; the view only reads them as anImageAsset. - 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
FileStorewith 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
srcsetandsizes; 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-mixinsthemeicontokens pick which drawing a component renders.