[FR] Deprecating `django-stdimage` and migrate to `django-picture`

Open
#11,647 6 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@YutingDuan111 is already working on this.

Since Jun 12, 2026.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
22/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Quiet
Tech stack
django, python
Domain
backend

Research direction

The payload names no InvenTree files, only the failing django-stdimage tests: tests/test_commands.py and tests/test_models.py (TestModel, TestUtils, TestJPEGField). Start by reading how the project uses the stdimage fields and running those tests on Django 5.2 to confirm the failures. The work is a dependency swap that needs design choices, so check with maintainers first. Done means django-picture replaces django-stdimage and the suite passes on Django 5.2.

Written by the indexing model from the issue text.

Description

dependency help wanted
Please verify that this feature request has NOT been suggested before.
  • I checked and didn't find a similar feature request
Problem statement

The django-stdimage has been deprecated for a while now in favor of django-picture as a successor for this. ref. Also, the support for Django 4.2 will soon come to the end. Additionally, when I tested django-stdimage with django 5.2, there are some features that aren't compatible with django 5.2.

These are tests that failed when testing with django 5.2

"tests/test_commands.py"
"tests/test_models.py::TestModel::test_variations"
"tests/test_models.py::TestModel::test_cropping"
"tests/test_models.py::TestModel::test_custom_render_variations"
"tests/test_models.py::TestModel::test_defer"
"tests/test_models.py::TestModel::test_variations_deepcopy"
"tests/test_models.py::TestUtils::test_render_variations_callback"
"tests/test_models.py::TestUtils::test_render_variations_overwrite"
"tests/test_models.py::TestJPEGField::test_convert"
"tests/test_models.py::TestJPEGField::test_convert_multiple"

Those tests are running fine with django 4.2 which will soon be the end of life. This means that there are some features that aren't compatible with django 5.2. And it will soon break InvenTree project if still keep using this.

I also believe it's a good idea to migrate to a more maintained dependency and support latest django. Since there will more features won't be compatible with newer django because it hasn't maintained anymore.

Suggested solution

Replace django-stdimage with django-picture

Describe alternatives you've considered

Please consider migrate it.

Examples of other systems

No response

Do you want to develop this?
  • I want to develop this.
Dominant language
Python
Stars
7.7k
Forks
1.6k
Avg merge
21h 45m
Merged PRs (30d)
204

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from inventree/InvenTree

All issues in inventree/InvenTree

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.