Skip to content

Warning fields.E101 only appears when None in aspect ratios #227

@jmsmkn

Description

@jmsmkn

The warning only shows up when None is set in aspect_ratios.

if None in self.aspect_ratios and not (self.width_field and self.height_field):

However, if I follow the README example but only want to have cropped images by setting aspect_ratios=["16/9"] I do not get the warning, but end up with performance problems as

{% picture profile.picture img_alt="Spiderman" ratio="16/9" %}

will result in a hit to width and height, which involves a load of the image from storage.

Do you think that the warning should always be returned if not (self.width_field and self.height_field):?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions