def check_previewUrls(search_results):
    """ Checks if a result provides a previewUrl for thumbnails. Otherwise a placeholder will be set.

    This function is needed to avoid too much logic in template rendering.

    Args:
        search_results: Contains all search results
    Returns:
        search_results
    """
    for result_key, result_val in search_results.items():
        results = result_val.get(result_key, {}).get("srv", [])
        for result in results:
            if len(result.get("previewUrl", "")) == 0:
                result["previewUrl"] = None
    return search_results