'Create thumbnail images for this CourseOverview.
This will save the CourseOverviewImageSet before it returns.'

@classmethod
def create(cls, course_overview, course=None):

    from openedx.core.lib.courses import create_course_image_thumbnail
    config = CourseOverviewImageConfig.current()
    if (not config.enabled):
        return
    if (not course):
        course = modulestore().get_course(course_overview.id)
    image_set = cls(course_overview=course_overview)
    if course.course_image:
        try:
            image_set.small_url = create_course_image_thumbnail(course, config.small)
            image_set.large_url = create_course_image_thumbnail(course, config.large)
        except Exception:
            log.exception('Could    not    create    thumbnail    for    course    %s    with    image    %s    (small=%s),    (large=%s)', course.id, course.course_image, config.small, config.large)
    try:
        with transaction.atomic():
            image_set.save()
            course_overview.image_set = image_set
    except (IntegrityError, ValueError):
        pass
