GuidesModules
Optimized images
Render Ovok-hosted images with the SDK's layout and URL helpers
- Stable unknown
- Release candidate since 1.16.1-rc.3
- Development since 1.16.1-dev.2111+9796905
Use OptimizedImage for image URLs served by the Ovok API when the app needs the
SDK's dimension calculation and optimized URL parameters. The component uses
expo-image for loading and caching; it is not an image upload or authorization API.
import { OptimizedImage } from "@ovok/native/image";
<OptimizedImage uri={imagePath} width={320} aspectRatio={16 / 9} fit="cover" />Render it below the OvokProvider so the component can read the configured client
base URL. Use a fixed or constrained layout when the image dimensions are known,
and provide a fallback for missing or inaccessible images. Do not pass an untrusted
URL where the app expects an Ovok-hosted path.
References
API reference
Every export of @ovok/native/image, with signatures, props and types, is in the image API reference.
Component pages: image.
Last updated on