managarten/nutriphi/ReadMes/Expo-ImagePicker.md
Till-JS 6537863696 feat(nutriphi): migrate from Supabase to PostgreSQL + Hetzner S3
- Add nutriphi-database package with Drizzle ORM
  - meals and nutrition_goals schemas
  - PostgreSQL 16 Docker setup
  - Drizzle Kit configuration

- Migrate backend from Supabase to Drizzle
  - Add DatabaseModule with connection pooling
  - Add StorageService for Hetzner Object Storage (S3-compatible)
  - Update MealsService with Drizzle queries
  - Add /api/meals/upload endpoint for image upload + analysis

- Update web app to use backend for uploads
  - Remove Supabase Storage direct upload
  - Update uploadService to send images to backend
  - Remove Supabase dependencies from package.json
  - Simplify hooks.server.ts

- Add Coolify deployment configuration
  - Dockerfile for production build
  - docker-compose.coolify.yml

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-25 17:52:14 +01:00

25 KiB
Raw Blame History

Expo ImagePicker

A library that provides access to the system's UI for selecting images and videos from the phone's library or taking a photo with the camera.

Bundled version: ~16.1.4 expo-image-picker provides access to the system's UI for selecting images and videos from the phone's library or taking a photo with the camera.

Installation Terminal

Copy

npx expo install expo-image-picker If you are installing this in an existing React Native app, make sure to install expo in your project.

Known issues On iOS, when an image (usually of a higher resolution) is picked from the camera roll, the result of the cropped image gives the wrong value for the cropped rectangle in some cases. Unfortunately, this issue is with the underlying UIImagePickerController due to a bug in the closed-source tools built into iOS.

Configuration in app config You can configure expo-image-picker using its built-in config plugin if you use config plugins in your project (EAS Build or npx expo run:[android|ios]). The plugin allows you to configure various properties that cannot be set at runtime and require building a new app binary to take effect.

Example app.json with config plugin app.json

Copy

{ "expo": { "plugins": [ [ "expo-image-picker", { "photosPermission": "The app accesses your photos to let you share them with your friends." } ] ] } } Configurable properties Name Default Description photosPermission "Allow $(PRODUCT_NAME) to access your photos" Only for:

A string to set the NSPhotoLibraryUsageDescription permission message.

cameraPermission "Allow $(PRODUCT_NAME) to access your camera" Only for:

A string to set the NSCameraUsageDescription permission message.

microphonePermission "Allow $(PRODUCT_NAME) to access your microphone" Only for:

A string to set the NSMicrophoneUsageDescription permission message.

Are you using this library in an existing React Native app? Usage Image Picker

Copy

Open in Snack

import { useState } from 'react'; import { Button, Image, View, StyleSheet } from 'react-native'; import * as ImagePicker from 'expo-image-picker';

export default function ImagePickerExample() { const [image, setImage] = useState<string | null>(null);

const pickImage = async () => { // No permissions request is necessary for launching the image library let result = await ImagePicker.launchImageLibraryAsync({ mediaTypes: ['images', 'videos'], allowsEditing: true, aspect: [4, 3], quality: 1, });

console.log(result);

if (!result.canceled) {
  setImage(result.assets[0].uri);
}

};

return (