{
  "id": 3311936,
  "title": "How I Built a Bulk Image Converter That Runs Entirely in Your Browser",
  "url": "https://urgent.news/2026/08/25/how-i-built-a-bulk-image-converter-that-runs-entirely-in-your-browser",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-08-25T17:20:14.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/muhayminbinmehmood/how-i-built-a-bulk-image-converter-that-runs-entirely-in-your-browser-1be0"
  },
  "original_language": "en",
  "account": "In recent times, a developer crafted a bulk image converter named BatchSet that operates entirely within a user's web browser. This tool converts products' JPG images to WebP format without requiring any uploads, sign-ups, watermarks, or the burden of a ZIP file download. The post explains the workings of the browser-side pipeline, its limitations, and why client-side processing is both more powerful and more constrained than one might expect.\n\nThe core pipeline of BatchSet involves several steps:\n1. User dropping files: this action triggers the conversion process.\n2. FileReader reads as ArrayBuffer: The browser reads the files and stores them as an ArrayBuffer.\n3. createImageBitmap decodes in a Web Worker: The decoding of images happens off the main thread, allowing for smoother UI performance.\n4. OffscreenCanvas draws + encodes to target format: The decoded bitmap is drawn onto an OffscreenCanvas, which is then used to convert the image into the desired format (WebP, JPG, PNG, etc.).\n5. JSZip packages everything: The converted images are packaged into a ZIP file using JSZip.\n6. Auto-download ZIP: Once packaged, the ZIP file is downloaded automatically.\n\nKey points of the pipeline include:\n- createImageBitmap: This function decodes images off the main thread, which significantly improves performance.\n- OffscreenCanvas: This API enables offloading encoding tasks, particularly for large images or high-quality outputs, to a worker thread without freezing the tab.\n- Web Workers: These are used to run multiple workers in parallel, improving the conversion speed. The number of workers is determined by the device's hardware concurrency.\n- JSZip: This library is used to package the converted images into a ZIP file while minimizing memory usage. It streams images into JSZip to avoid memory explosions, especially important for large batch conversions.\n- Limitations: The browser cannot process all image formats, such as HEIC (iPhone photos) or TIFF files, which require server-side processing. Additionally, specific features like watermarking with complex fonts and layouts are better handled on the server.\n\nThe privacy advantage of BatchSet is significant: since the images never leave the user's device, there is no risk of sensitive data being uploaded to a server. However, this approach requires robust hardware, as heavy processing can strain devices with limited memory.\n\nComparatively, converting images on a local machine versus a browser on modern hardware shows a considerable difference in processing time and efficiency. For example, converting 100 product images at 80% quality can be done in approximately 48 seconds on a local browser with 8 cores, whereas the same task might take around 1 hour and 35 minutes on a typical server-based converter with an upload process.\n\nThe code provided in the source segment outlines a minimal worker script that handles the conversion process. It includes decoding the image, calculating dimensions if a maximum width is specified, drawing it onto an OffscreenCanvas, and encoding it to the target format (WebP in this case).",
  "summary": "A few months ago, I needed to convert 400 product images from JPG to WebP for a Shopify store. I tried the usual online converters. Every single one of them made me upload my files to a server, wait in a queue, and then download a ZIP. Some put watermarks on the free tier. Others capped me at 10 images unless I paid. For 400 images, that workflow was painful. But the part that really bothered me…",
  "key_points": [
    "BatchSet converts JPG to WebP without uploads or downloads",
    "Browser-side pipeline decodes images in Web Worker",
    "Privacy advantage: images never leave user's device"
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}