import json


def get_all_titles(images_ndjson):
    """Load a list of all titles from images.ndjson."""
    titles = []
    with open(images_ndjson) as f:
        for line in f:
            row = json.loads(line)
            title = row.get('title')
            if title:
                titles.append(title)
    return titles