wagtail-image-directories
Organize your Wagtail CMS media files into structured year/slug directories on disk with an interactive visual Image Navigator and bulk-action file manager in the Wagtail admin.
Features
- Structured Storage: Images are physically organized on disk as
media/images/{year}/{slug}/filename.ext. - Image Navigator: A dashboard grouped by root directories (years) with real-time statistics (file count, total size, last updated).
- In-place Drag & Drop Upload: Upload images directly into the targeted folder without page reloads.
- Bulk Operations: Select multiple images to move or delete with automatic disk cleanup.
- Directory Management: Create, rename, and merge directories right from the admin UI.
Installation
pip install wagtail-image-directories
Add to INSTALLED_APPS in your settings.py:
INSTALLED_APPS = [
...
"wagtail_image_directories",
...
]
Configure your Custom Image Model
In your models file:
from wagtail_image_directories.models import AbstractDirectoryImage
from wagtail.images.models import AbstractRendition
class CustomImage(AbstractDirectoryImage):
pass
class CustomRendition(AbstractRendition):
image = models.ForeignKey(CustomImage, on_delete=models.CASCADE, related_name="renditions")
class Meta:
unique_together = (("image", "filter_spec", "focal_point_key"),)
Point Wagtail to your custom model in settings.py:
WAGTAILIMAGES_IMAGE_MODEL = 'your_app.CustomImage'
Run migrations:
python manage.py makemigrations
python manage.py migrate
Case Study & Background
Read the full story behind the migration and architecture on our blog: Vs-Svet.ru / ZenWay.ru.
Recommended Complementary Package
To enable seamless native image uploads directly inside your rich text editor with full directory awareness, check out our companion plugin: 👉 wagtail-prose-editor-images
Release files for wagtail-image-directories 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| wagtail_image_directories-0.1.2.tar.gz | 27.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| wagtail_image_directories-0.1.2-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Total release size: 62.1 kB
Release files / wagtail_image_directories-0.1.2.tar.gz
| Download URL | wagtail_image_directories-0.1.2.tar.gz |
|---|---|
| Size | 27.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
88065ead4ef6d6a772032063204aa4352c9e20a11d3d36c4dbccc0f4f1746e02
|
|
BLAKE2b-256 checksum How to use checksums |
df26701511c4f2b347e4c11f5e88b4e0840918afd644f70ca6e6b4dffc3b3ced
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-requests/2.34.2
|
Release files / wagtail_image_directories-0.1.2-py2.py3-none-any.whl
| Download URL | wagtail_image_directories-0.1.2-py2.py3-none-any.whl |
|---|---|
| Size | 34.7 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
a9141736daf0cb54f51679e4e222b81dec47a1e1acb8581267eadb308a9da16d
|
|
BLAKE2b-256 checksum How to use checksums |
dd671b4f06245cbb184ac7bd134433d88ef0218b27e1a03062ff8c498cc9fd1b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-requests/2.34.2
|