Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Feature request - ALLOWED_WIDTHS and ALLOWED_HEIGHTS #1624

@mylselgan

Description

@mylselgan

Feature Request

We use only 3 to 4 dimensions of images in our site. We already configured ALLOWED_SOURCES so that others can not abuse our server with their domain.
Additionally ALLOWED_WIDTHS and ALLOWED_HEIGHTS would be very useful so that we won't need to configure complex SECURITY_KEY feature to prevent image size abuses.

For example
ALLOWED_WIDTHS = ["400", "550"]
ALLOWED_HEIGHTS = ["200", "400"]

with this configuration we only can create
400x200, 400x400, 550x200 and 550x400

I think this can be easily implemented (I am not sure about the complexity) as MAX_WIDTH and MAX_HEIGHT feature is already available.

100s of Thanks to the developers, contributors and financial supporters for this great open source tool.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions