<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Sheng Shen</title>
    <description>The latest articles on DEV Community by Sheng Shen (@sheng_shen).</description>
    <link>https://dev.to/sheng_shen</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4244038%2Fdcc09142-54d1-4406-8ea3-008573a5e025.png</url>
      <title>DEV Community: Sheng Shen</title>
      <link>https://dev.to/sheng_shen</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sheng_shen"/>
    <language>en</language>
    <item>
      <title>I made a small browser tool to shrink chat photos and remove metadata</title>
      <dc:creator>Sheng Shen</dc:creator>
      <pubDate>Sat, 14 Nov 2026 07:10:58 +0000</pubDate>
      <link>https://dev.to/sheng_shen/i-made-a-small-browser-tool-to-shrink-chat-photos-and-remove-metadata-4ofd</link>
      <guid>https://dev.to/sheng_shen/i-made-a-small-browser-tool-to-shrink-chat-photos-and-remove-metadata-4ofd</guid>
      <description>&lt;p&gt;I send photos through WhatsApp and Telegram pretty often, and I've always found two things annoying.&lt;/p&gt;

&lt;p&gt;One is the file size. A photo from my phone can easily be 5 MB or more, which feels unnecessary when I'm just sending someone a picture in a chat. Some apps compress photos automatically, but the results aren't always great. Others have upload limits, and large files can be a pain on a slow connection.&lt;/p&gt;

&lt;p&gt;The other thing is metadata. Photos taken on a phone can contain GPS coordinates, the phone model, the date and time they were taken, and other EXIF information. Most people probably don't think about this when sharing photos. I didn't pay much attention to it either until I started looking into how much information a single image file can carry.&lt;/p&gt;

&lt;p&gt;Why not just use an online compressor?&lt;/p&gt;

&lt;p&gt;There are plenty of image compression websites out there. The problem is that many of them ask you to upload the original photo to their servers.&lt;/p&gt;

&lt;p&gt;That seems a little backwards if part of the reason you're compressing the photo is to remove private information.&lt;/p&gt;

&lt;p&gt;I wanted something that could do both jobs without sending the original image anywhere.&lt;/p&gt;

&lt;p&gt;Browsers already have the tools needed for this. You can load an image locally, resize it using Canvas, and export it as a new JPEG, WebP, or PNG. That also removes the original EXIF, XMP, and IPTC metadata.&lt;/p&gt;

&lt;p&gt;So I put together a small tool around that idea.&lt;/p&gt;

&lt;p&gt;The tool&lt;/p&gt;

&lt;p&gt;It's here: Chat Image Shrinker&lt;/p&gt;

&lt;p&gt;You select the chat app you're sending the photo to, add your images, and download the processed versions.&lt;/p&gt;

&lt;p&gt;I added presets for WhatsApp, Telegram, Discord, Slack, and WeChat, mostly because those are the apps I wanted to cover first.&lt;/p&gt;

&lt;p&gt;It supports JPEG, PNG, and WebP files, and you can process up to 30 images at once. There's also a ZIP download option, which saves a bit of clicking when you're dealing with a bunch of photos.&lt;/p&gt;

&lt;p&gt;If the preset doesn't suit your needs, you can open Adjust settings and change the output format, longest edge, image quality, or maximum file size.&lt;/p&gt;

&lt;p&gt;One feature I particularly wanted was the metadata report. Under each image, the page shows what metadata it found in the original file and what was removed.&lt;/p&gt;

&lt;p&gt;I also didn't want the tool to recompress everything blindly. If an image is already small enough and has no metadata to remove, there's no point changing it. And if re-encoding makes the file larger, the tool can preserve the original image data while stripping the metadata instead.&lt;/p&gt;

&lt;p&gt;Everything runs locally in the browser. There's no image upload endpoint, and the page's Content Security Policy restricts network requests to the same site.&lt;/p&gt;

&lt;p&gt;Does it actually make much difference?&lt;/p&gt;

&lt;p&gt;With one of my phone photos, the original file was 5.48 MB.&lt;/p&gt;

&lt;p&gt;Using the WhatsApp preset, it came down to 146 KB.&lt;/p&gt;

&lt;p&gt;That's a pretty big reduction, and when I viewed the result on my phone, it still looked fine for normal chat use.&lt;/p&gt;

&lt;p&gt;Of course, that won't happen with every image. A detailed photo, a screenshot with small text, and a simple picture of a meal will all compress differently. But for the kinds of photos I usually send in chats, the results have been good enough.&lt;/p&gt;

&lt;p&gt;The annoying part was figuring out the limits&lt;/p&gt;

&lt;p&gt;I thought the image processing would be the hardest part. It turned out that finding reliable upload limits for different chat apps took more effort than expected.&lt;/p&gt;

&lt;p&gt;Some apps document their limits clearly. Others have different limits depending on whether you're using a regular account, a bot, or a business API. And sometimes even the official help pages don't agree.&lt;/p&gt;

&lt;p&gt;Discord was a good example. I found an official page mentioning 20 MB for free accounts, while an older page still referred to 10 MB.&lt;/p&gt;

&lt;p&gt;Telegram's Bot API documents a 10 MB limit for photos, but that doesn't mean every Telegram upload works the same way.&lt;/p&gt;

&lt;p&gt;So instead of pretending there's one correct number for every app, I linked the sources next to the presets. When I chose a value myself, I labeled it that way.&lt;/p&gt;

&lt;p&gt;For example, the Telegram preset uses a 2560 px longest edge. That's my choice for a reasonable chat image size, not an official Telegram requirement.&lt;/p&gt;

&lt;p&gt;I figured that was better than presenting guesses as platform rules.&lt;/p&gt;

&lt;p&gt;A small thing I learned&lt;/p&gt;

&lt;p&gt;Before building this, I assumed an image shrinker should always try to make files smaller.&lt;/p&gt;

&lt;p&gt;But sometimes that's not useful.&lt;/p&gt;

&lt;p&gt;If someone uploads a small JPEG that's already well-compressed, processing it again might make it look worse or even increase its size. In that case, removing the metadata without changing the actual image is a better result.&lt;/p&gt;

&lt;p&gt;That ended up being one of the more useful parts of the tool.&lt;/p&gt;

&lt;p&gt;Anyway, it's a small project, but I've found it handy.&lt;/p&gt;

&lt;p&gt;If you want to try it, here's the link again:&lt;/p&gt;

&lt;p&gt;Chat Image Shrinker&lt;/p&gt;

&lt;p&gt;No account needed, and the images stay in your browser.&lt;/p&gt;

&lt;p&gt;I'd be interested to know how it works on older phones, especially with large images or batches of photos. If something breaks, or you run into a format it doesn't handle properly, let me know in the comments.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>privacy</category>
      <category>showdev</category>
    </item>
  </channel>
</rss>
