Let's talk a bit …
Apr 12th
Get rid of huge images in your Plone site
Do you have users that don’t care about image sizes at all ?
Do you have Plone sites with tons of raw photos galleries ?
Do you want to shrink your Data.fs ?
Then try the new collective.autoscaling package !
It allows automatic scaling of large images uploaded into your Plone sites.
You can configure the maximum width / height you are willing to tolerate and it does the rest !
This is totally transparent to the user (except if you choose to show message).
Images can be either Image content type or any Image field on Dexterity content types.
Example 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).
There is also a migration view you can call on any folder (or at the site root) to resize all contained images.
collective.autoscaling (developed for IMIO) is available on Github and version 1.0 has just been released on Pypi.
Please enjoy, improve and send feedback !
April 12, 2016 - 3:28 pm
Yay!
April 14, 2016 - 2:45 pm
Great! Thank you for a very useful addon! You should consider writing a PLIP to add this feature into the core. It’s very little code, has great test-coverage (even robot-tests) and seems very useful for most installation.