# Goal Add image upload to [page/feature, e.g. the profile settings page]. ## Requirements 1. Drag-and-drop area plus "Choose file" button. 2. Show a preview before upload and a progress bar during upload. 3. Accept [types, e.g. JPG, PNG, WebP] up to [size, e.g. 5 MB]. 4. Store files in [storage, e.g. Supabase Storage bucket "avatars"] and save the URL to [table.column]. ## Constraints - Validate type and size on the client and the server. - Resize images over 2000px wide before upload.
Write better AI coding prompts and get working code on the first try — free at zoeyprompts.com.