Skip to content

Smart cropping sometimes has the wrong dimensions #801

@ataylor32

Description

@ataylor32

This is what I'm running:

from sorl.thumbnail.shortcuts import get_thumbnail
thumbnail = get_thumbnail(
    'https://i.ytimg.com/vi/JxS5E-kZc2s/maxresdefault.jpg',
    '200x200',
    crop='smart',
)
print(thumbnail.size)

This is the output:

[44, 200]

This is what I would expect the output to be:

[200, 200]

This is what I have installed:

Django==6.0.1
pillow==12.1.0
sorl-thumbnail==13.0.0

See #646

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions