sa_br
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: v3View latest version
A simple web application that allows users to upload images and remove their backgrounds using the Remove.bg API.
- Drag and drop image upload
- Preview of original and processed images
- Download processed images with transparent backgrounds
- Responsive design that works on mobile and desktop
This application requires a Remove.bg API key to function. You need to set up an environment variable in Val Town:
- Sign up for a free account at Remove.bg
- Get your API key from the Remove.bg dashboard
- Add the API key as an environment variable in Val Town:
- Variable name:
REMOVE_BG_API_KEY - Value: Your Remove.bg API key
- Variable name:
- Upload an image by dragging and dropping it onto the designated area or by clicking to select a file
- Click the "Remove Background" button to process the image
- Once processing is complete, you can download the image with the background removed
- The free tier of Remove.bg API has a limited number of API calls
- Maximum file size is 10MB
- Supported file formats: PNG, JPG, JPEG
This application is built using:
- Frontend: HTML, CSS (with Tailwind via CDN), and vanilla JavaScript
- Backend: Hono framework running on Val Town's Deno runtime
- Image processing: Remove.bg API
/index.ts- Main HTTP handler and API endpoint/frontend/index.html- Frontend UI for the application