A simple web app that resizes any photo to fit perfectly in a 640x640 square canvas while preserving the original image proportions. Perfect for creating WhatsApp profile pictures.
Features
Upload any photo (horizontal or vertical)
Automatically resizes and scales to fit within a 640x640 square canvas
Preserves original image proportions - no cropping!
White background fills any empty space
Mobile-friendly interface
Download or share the resized image
Preview before processing
Usage
Click "Choose Photo" to select an image
Preview your selected image
Click "Resize to Square for WhatsApp" to process
Download or share the final square image
How it Works
The app uses smart scaling to ensure your photo fits entirely within the 640x640 square:
Portrait photos: Scales down to fit height, adds white background on sides
Landscape photos: Scales down to fit width, adds white background on top/bottom
Square photos: Scales to fit perfectly
No cropping - your entire photo is preserved!
Technical Details
Frontend: React with TypeScript
Canvas API for image processing and smart scaling
Responsive design with TailwindCSS
Works on mobile and desktop
Client-side processing (no server upload required)
JPEG output with white background for better compatibility
Project Structure
├── frontend/
│ ├── index.html # Main HTML template
│ ├── index.tsx # React app entry point
│ └── components/
│ └── App.tsx # Main app component
├── backend/
│ └── index.ts # Static file server
└── README.md