collective.autoscaling
This package allows automatic scaling of too large images in Plone sites. Images can be either Image content type or any Image field on content types.
This is totally transparent to the user (except if you choose to show message).
There is also a view (@@resize-images) that you can call to scale existing images (under the context of your choice), for example:
- http://localhost:8080/plone/@@resize-images
- http://localhost:8080/plone/folder/subfolder/@@resize-images
Settings
- Enable automatic scaling (yes / no)
- Maximum height at which images will be automatically resized (in pixels)
- Maximum width at which images will be automatically resized (in pixels)
- JPEG quality
- Show information message to user when images have been resized (yes / no)
Use case
- You configure collective.autoscaling to have images with maximum size of height 800px / width 1200px.
- One of your user uploads a really big image: height 2000px / width 4000px.
- This image will be resized to height 600px / width 1200px (aspect ratio is of course preserved).
Limitations
This add-on works only with Dexterity content types.
Version 2.x supports Plone 6.1 on Python 3.10 to 3.13, and Plone 6.2 on Python 3.10 to 3.14. For Plone 4.3 to 6.0, use collective.autoscaling 1.x.
Translations
This product has been translated into
- English
- French
- Norwegian
- Portuguese
Installation
Add collective.autoscaling to the dependencies of your project
(pyproject.toml, or requirements.txt with the Plone constraints), install it,
restart Plone and activate the add-on in Site Setup > Add-ons.
Development
Requires uv. This installs Plone 6.2.3 in .venv
(use PLONE_VERSION=6.1.6 make install for another version) and the prek git hook:
make install
make start # Plone on http://localhost:8080 (admin / admin)
Create a Classic UI site from the browser, then activate collective.autoscaling.
Tests
Tests run through tox, as the CI does. The robot scenarios run in headless
Chrome, which must be installed (Node.js too, for rfbrowser init):
make test # Plone 6.2.3
uvx --with tox-uv tox -e py312-plone61 # one Plone / Python combination
make test-all # lint, every combination, dependencies
Integration tests only, without tox:
.venv/bin/zope-testrunner --test-path=src -s collective.autoscaling
Lint
make check # format then lint (pyupgrade, isort, black, zpretty, flake8...)
.editorconfig, .flake8, .gitignore, .pre-commit-config.yaml, tox.ini,
.github/ and the tool sections of pyproject.toml are generated by
plone.meta: change .meta.toml, then run
uvx --from plone.meta config-package --no-commit --branch current ..
Contribute
- Issue Tracker: https://github.com/collective/collective.autoscaling/issues
- Source Code: https://github.com/collective/collective.autoscaling
License
The project is licensed under the GPLv2.
Contributors
- Laurent Lasudry, Original Author [Affinitic]
- Espen Moe-Nilssen
- Marc Lavallée
Changelog
2.0.0 (2026-11-18)
-
Breaking: replace the
pkg_resourcesnamespace ofcollectivewith a PEP 420 native namespace. Support Plone 6.1 only on Python 3.10 to 3.13, and Plone 6.2 on Python 3.10 to 3.14. Use 1.x for Plone 4.3 to 6.0. [remdub] -
Import
IPloneSiteRoot,INonInstallableandget_installerfromplone.baseinstead of the aliases Plone 6.2 deprecates, and useplone.testing.zopein the test layers. [remdub] -
Include the CMFCore permissions in
configure.zcml, so the package also loads when it is included before Plone (zcml_package_includes). [remdub] -
Run the robot scenarios on the Plone 6.2 classic UI. [remdub]
-
Configure the package with plone.meta 2.12.0 (test matrix on Plone 6.2.3 and 6.1), move its metadata to
pyproject.toml, convert the documentation to Markdown and run the development environment on Plone 6.2.3 with uv instead of buildout. [remdub] -
Fix typos in french translations [remdub]
1.2 (2022-02-21)
-
Fix resize-images view that was saving nothing because of CSRF protection [laulaz]
-
Add support for Python 3 / Plone 6 [marclava, laulaz]
-
Add new JPEG Quality setting [marclava]
-
Improve resizing code [marclava]
-
Add uninstall profile [laulaz]
1.1.2 (2019-01-15)
-
Handle special cases when we don't get a request at ObjectAddedEvent (example: when an object is added at Zope startup) [laulaz]
-
Remove useless dependency on CMFDefault (#5) [laulaz]
1.1.1 (2016-07-28)
-
Pin plone.api to avoid any errors (#2) [laulaz]
-
Add Portuguese translation [laulaz]
1.1 (2016-04-13)
-
Remove dependency on plone.app.imagecropping (#1) [laulaz]
-
Translations cleanup [laulaz]
1.0 (2016-04-11)
- Initial release. [laulaz]
Metadata
Release files for collective.autoscaling 2.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| collective_autoscaling-2.0.0.tar.gz | 90.7 kB | Without provenance | Details for collective_autoscaling-2.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| collective_autoscaling-2.0.0-py3-none-any.whl | Python 3 | none | any | Details for collective_autoscaling-2.0.0-py3-none-any.whl |
Total release size: 187.4 kB
Release files / collective_autoscaling-2.0.0.tar.gz
| Download URL | collective_autoscaling-2.0.0.tar.gz |
|---|---|
| Size | 90.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e5fac0d42baf32fcd0d27948f7887826a4120737a24d5297b8acc23da230974a
|
|
BLAKE2b-256 checksum How to use checksums |
c038b10cb75d0e97b1ab29676be68765b99677a1687e97340072118f8b4ef260
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.3
|
Release files / collective_autoscaling-2.0.0-py3-none-any.whl
| Download URL | collective_autoscaling-2.0.0-py3-none-any.whl |
|---|---|
| Size | 96.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b7c44fc7d486dbe14fdf8e2579bb76bff87fea4dabb3563a1344ea8a065dac2d
|
|
BLAKE2b-256 checksum How to use checksums |
17da3eeea711553ae2d03d43ebf8437b05cfe26f93486a425dc736f7ca6175e1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.3
|
Security for collective.autoscaling 2.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.