Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request - ALLOWED_WIDTHS and ALLOWED_HEIGHTS #1624

Open
mylselgan opened this issue Nov 22, 2023 · 0 comments
Open

Feature request - ALLOWED_WIDTHS and ALLOWED_HEIGHTS #1624

mylselgan opened this issue Nov 22, 2023 · 0 comments

Comments

@mylselgan
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants