thumbnails/images.py
def get(source_name, size, metadata_backend=None, storage_backend=None):
    """
    Returns a Thumbnail instance, or None if thumbnail does not yet exist.
    """
    if storage_backend is None:
        storage_backend = backends.storage.get_backend()
    if metadata_backend is None:
        metadata_backend = backends.metadata.get_backend()

    metadata = metadata_backend.get_thumbnail(source_name, size)
    if metadata is None:
        return None
    else:
        return Thumbnail(metadata=metadata, storage=storage_backend)
def get(source_name, size, metadata_backend=None, storage_backend=None):
    """
    Returns a Thumbnail instance, or None if thumbnail does not yet exist.
    """
    if storage_backend is None:
        storage_backend = backends.storage.get_backend()
    if metadata_backend is None:
        metadata_backend = backends.metadata.get_backend()

    metadata = metadata_backend.get_thumbnail(source_name, size)
    if metadata is None:
        return None
    else:
        return Thumbnail(metadata=metadata, storage=storage_backend)
Returns a Thumbnail instance, or None if thumbnail does not yet exist.