def extensions_are_equivalent(ext1, ext2):
    """Return whether file extensions can be considered as equivalent."""
    synonyms = [{"jpg", "jpeg"}]
    ext1, ext2 = ext1.lower(), ext2.lower()
    return ext1 == ext2 or any((ext1 in s and ext2 in s) for s in synonyms)