import os

total_size = 0
large_files = []

for root, dirs, files in os.walk(r"d:\iss\Franciscan Society\assets\images"):
    for f in files:
        fp = os.path.join(root, f)
        size = os.path.getsize(fp)
        total_size += size
        if size > 500 * 1024:  # > 500KB
            large_files.append((size / (1024*1024), os.path.relpath(fp, r"d:\iss\Franciscan Society\assets\images")))

large_files.sort(key=lambda x: x[0], reverse=True)
print(f"Total assets/images size: {total_size / (1024*1024):.2f} MB")
print(f"Number of files > 500KB: {len(large_files)}")
print("Top 15 largest files (MB):")
for s, name in large_files[:15]:
    print(f"  {s:.2f} MB: {name}")
