diff --git a/src/img.rs b/src/img.rs
index 6afd2fd64c21b52124330c5fc909e5bb1d3edb54..8cba8fc546cb30c3e9db7f7f03e01dbe0b7a55c0 100644
--- a/src/img.rs
+++ b/src/img.rs
@@ -1,5 +1,5 @@
 use image::{imageops::FilterType, io::Reader as ImageReader, ImageOutputFormat};
-use std::{cmp::max, fs, io::Cursor, path::PathBuf, sync::mpsc::Receiver};
+use std::{cmp::max, collections::HashSet, fs, io::Cursor, path::PathBuf, sync::mpsc::Receiver};
 
 const IMG_MAX_SIZE: u32 = 2048;
 const JPEG_QUALITY: u8 = 100; // let ssdv do the compression
@@ -80,6 +80,7 @@ impl ImgInfo {
 pub struct ImgManager {
     paths: Vec<PathBuf>,
     imgs: Vec<ImgInfo>,
+    seen_imgs: HashSet<PathBuf>,
     // used to receive image requests, which will be sent at full resolution
     rx: Receiver<u8>,
 
@@ -99,6 +100,7 @@ impl ImgManager {
         Self {
             paths,
             imgs: vec![],
+            seen_imgs: HashSet::new(),
             rx,
 
             iter: 0,
@@ -230,19 +232,20 @@ impl ImgManager {
             // only files
             .filter(|(p, _)| p.is_file())
             // only new files
-            .filter(|(p, _)| !self.imgs.iter().any(|i| i.path == p.as_path()))
+            .filter(|(p, _)| !self.seen_imgs.contains(p))
             .collect();
 
         for (path, metadata) in new_imgs {
             let size_bytes = metadata.len();
 
             self.imgs.push(ImgInfo {
-                path,
+                path: path.clone(),
                 path_idx: self.path_idx,
                 size_bytes,
                 txed: false,
                 found_on_iter: self.iter,
             });
+            self.seen_imgs.insert(path);
         }
 
         Ok(())
diff --git a/src/main.rs b/src/main.rs
index a67e1528a1413b21bb3baccc0edb2dd1e81b1c8d..c6d42d6a5562bc3a8b08124a690897b392dde0c5 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -16,7 +16,6 @@ fn main() -> anyhow::Result<()> {
     let config = Config::load()?;
 
     let controller = Controller::new(config);
-
     controller.run_forever();
 
     Ok(())