diff --git a/theHarvester/lib/statichtmlgenerator.py b/theHarvester/lib/statichtmlgenerator.py
index 89dd783f..4ade4065 100644
--- a/theHarvester/lib/statichtmlgenerator.py
+++ b/theHarvester/lib/statichtmlgenerator.py
@@ -308,8 +308,9 @@ async def generatescreenshots(tups: List):
date = tup[0]
domain = tup[1]
path = tup[2].replace('\\', '\\\\')
- data = f'{{date:"{date}", domain:"{domain}", icon:"{path}"}},'
- base += data
+ if len(path) > 0:
+ data = f'{{date:"{date}", domain:"{domain}", icon:"{path}"}},'
+ base += data
base += '];'
return html.replace('xxxxxxxxx', base)
except Exception as e: