Menu

How we find duplicate photos and pick the best shot on-device (React Native + Expo modules)
📰

How we find duplicate photos and pick the best shot on-device (React Native + Expo modules)

DEV Community: reactnative·ethan·about 10 hours ago
#dlnNjUWa
#devtoreactnative#devto#dev#const#hash
Reading 0:00
15s threshold

TL;DR: CleanMaster is a free iOS & Android app that frees up phone storage: it finds duplicate and similar photos, keeps the best shot, clears old screenshots, chat-app media and big videos, and locks private files in a vault. Everything runs on the device. This post is how the photo part works under the hood.

📱 App Store · 🤖 Google Play

Phones fill up with near-copies: the same meme saved three times, a forwarded photo that came back from WhatsApp, a burst of 12 shots where only one has everyone's eyes open.

While building CleanMaster , a storage cleaner for iOS and Android, we set two rules: nothing leaves the phone , and nothing is deleted that the user hasn't reviewed . That ruled out sending photos to a cloud model. Here's how the on-device pipeline works, with the actual code.

1.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.