Repository navigation
Closed
Labels
backenddependenciesPull requests that update a dependency filepythonPull requests that update Python coderefacto
Description
Context
Pillow keeps raising security alerts on the backend (it was just upgraded to 13.0.0). Our dependencies only pull it in through easy-thumbnails, and the backend no longer uses easy-thumbnails at all. Pillow's only other use is a template tag that nothing calls. If we remove both, Pillow goes away and so do its alerts.
Dead code to remove
easy-thumbnails
src/backend/pyproject.toml:easy_thumbnails==2.10.1(then regenerateuv.lock; Pillow should drop out, check withuv tree --invert --package pillow)src/backend/impress/settings.py:"easy_thumbnails"inINSTALLED_APPSand theTHUMBNAIL_*settings (THUMBNAIL_ALIASESis empty)- There is no
get_thumbnailer,ThumbnailerImageField,{% thumbnail %}orImageFieldanywhere in the backend.
extra_tags template tags (the only direct Pillow import)
src/backend/core/templatetags/extra_tags.py: thebase64_statictag andimage_to_base64usePIL.ImageFile.Parser, but no template or MJML source usesbase64_static.{% load ... extra_tags %}in the mail templates (core/templates/mail/html/template.html,core/templates/mail/text/template.txt) and in their MJML sources insrc/mail, so they don't come back on the nextmake mails-build. If the import of PIL stays while Pillow is removed, thisloadwould break mail rendering.
Database
- The
easy_thumbnails_source,easy_thumbnails_thumbnail(andeasy_thumbnails_thumbnaildimensions) tables stay in existing databases once the app is removed. Decide whether to drop them with a migration incoreor leave them. src/backend/core/management/commands/anonymize_database.pylistseasy_thumbnails_sourceandeasy_thumbnails_thumbnail: remove them, or make sure the command handles missing tables.
Done when
- Neither
easy-thumbnailsnorpillowis insrc/backend/uv.lock - Mails still render (HTML and text)
make lintand the backend tests pass
Metadata
Metadata
Assignees
Labels
backenddependenciesPull requests that update a dependency filepythonPull requests that update Python coderefacto
Type
Projects
- StatusShow more project fieldsDone
Activity
RoeeSivan commentedon Oct 24, 2026
Hi @lunika, I'd like to take this one. I checked the current main and found a few things to handle besides removing the dependency:
easy_thumbnails), butcore/templatetags/extra_tags.pyimportsPILfor thebase64_statictag. No template uses that tag.mail/mjml/template.mjmlonly does{% load extra_tags %}. I'd remove the tag (and the module if it ends up empty) along with thatload.core/management/commands/anonymize_database.pytruncateseasy_thumbnails_sourceandeasy_thumbnails_thumbnail. Once the app is removed, those tables won't exist on new installs and the command would fail, so I'd remove them fromTRUNCATES.easy_thumbnailsfromINSTALLED_APPS, theTHUMBNAIL_*settings andpyproject.toml. No migration depends on it.One question: on existing instances, the two
easy_thumbnails_*tables will stay in the database. Should I add a migration that drops them, or leave them?Can you assign it to me?
lunika commentedon Oct 25, 2026
I would let them, add an entry in the upgrade guide to inform users and let them decide if they wan to keep these tables or not.
🔥(backend) remove easy-thumbnails and Pillow