mirror of
https://github.com/supabase/supabase.git
synced 2026-10-10 11:55:05 +03:00
Both shims still degrade to a plain <img> (Vite has no Next image
optimizer), but the prop surface now matches the real APIs so consumer
code compiles and behavioural defaults line up with Next.
Added across both:
- forwardRef so callers can take an HTMLImageElement ref.
- \`loader\` prop that, when provided, is called with { src, width,
quality } to build the final src URL.
- \`onLoadingComplete\` callback fired on image load, plus an effect
that fires it on mount when the image is already cached.
- \`unoptimized\` accepted-and-dropped (no optimizer to disable).
- \`sizes\`, \`quality\`, \`placeholder\`, \`blurDataURL\` typed and accepted.
- \`priority\` now drives loading='eager' + fetchPriority='high';
\`loading\` honoured when explicitly set, otherwise defaults to 'lazy'
matching Next.
- Object-form src ({ src, width, height }) supported in addition to
string.
next/image-specific: \`fill\` flag still stretches the image to its
container.
next/legacy/image-specific: \`layout\` / \`objectFit\` / \`objectPosition\`
preserved.