diff --git a/extensions/gallery/script.py b/extensions/gallery/script.py
index 500d1b71..98d66343 100644
--- a/extensions/gallery/script.py
+++ b/extensions/gallery/script.py
@@ -49,7 +49,7 @@ def generate_html():
container_html = f'
'
# Iterate through files in image folder
- for file in Path("characters").glob("*"):
+ for file in sorted(Path("characters").glob("*")):
if file.name.endswith(".json"):
character = file.name.replace(".json", "")
container_html += f'
'