Skip to main content

Optimized images

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​