def get_image_path(definition):
    """Helper to get path of image from a definition in resource directory.

    :param definition: A definition (hazard, exposure).
    :type definition: dict

    :returns: The definition's image path.
    :rtype: str
    """
    path = resources_path(
        'img', 'wizard', 'keyword-subcategory-%s.svg' % definition['key'])
    if os.path.exists(path):
        return path
    else:
        return not_set_image_path