Skip to content

Conversation

@ashkov
Copy link

@ashkov ashkov commented Oct 31, 2025

Problem

When using MinIO/S3 storage, if an image file is deleted from storage,
the admin interface crashes with NoSuchKey exception because
get_attrs() doesn't handle missing files properly.

Solution

Add Exception handling in get_attrs() function to catch cases when
image file doesn't exist in storage.

Changes

  • Modified image_cropping/widgets.py
  • Added try/except block around image.width and image.height access

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant