T
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Viewing readonly version of main branch: v16View latest version
A simple web app that automatically crops any photo to fit perfectly in a 1:1 square canvas. Perfect for creating WhatsApp profile pictures.
- Upload any photo (horizontal or vertical)
- Automatically crops and scales to fill a 640x640 square canvas
- No background visible - your full photo fills the entire square
- Smart cropping that preserves the center of your image
- Mobile-friendly interface
- Download or share the resized image
- Preview before processing
- Click "Choose Photo" to select an image
- Preview your selected image
- Click "Crop to Square for WhatsApp" to process
- Download or share the final square image
The app uses smart cropping to ensure your photo fills the entire 640x640 square:
- Portrait photos: Crops top and bottom edges, keeps the center
- Landscape photos: Crops left and right edges, keeps the center
- Square photos: Scales to fit perfectly
- No black or white backgrounds - just your photo!
- Frontend: React with TypeScript
- Canvas API for image processing and smart cropping
- Responsive design with TailwindCSS
- Works on mobile and desktop
- Client-side processing (no server upload required)
- JPEG output for better compatibility and smaller file sizes
├── 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