Tech
I Built an Image Compressor That Runs 100% in the Browser
Most "compress your image" websites upload your photo to a server. You don't need one. The browser's own canvas can re-encode an image at any quality — I built a drag-and-drop compressor in about 30 lines , and your photo never leaves your machine.
🗜️ Try it (drop a photo): https://dev48v.infy.uk/solve/day9-image-compressor.html
1. Catch the dropped file — locally
drop . addEventListener ( " drop " , e => {
e . preventDefault ();
const f...
Read the full discussion on Dev.to
This article was aggregated from Dev.to. Click to join the conversation.
View on Dev.to