plone / plone.scale

Contains image scaling logic for use in Zope environments. It supports Zope 2, Pyramid and other systems build on using the Zope ToolKit (ZTK).
https://pypi.org/project/plone.scale
2 stars 16 forks source link

ask for original image if info["data"] is not set #71

Closed MrTango closed 1 year ago

MrTango commented 1 year ago

This needs this commit, which i accidentally directly committed to master here: https://github.com/plone/plone.namedfile/commit/04fad1206fa570d9ed931915ac838c2cf7248680

mister-roboto commented 1 year ago

@MrTango thanks for creating this Pull Request and helping to improve Plone!

TL;DR: Finish pushing changes, pass all other checks, then paste a comment:

@jenkins-plone-org please run jobs

To ensure that these changes do not break other parts of Plone, the Plone test suite matrix needs to pass, but it takes 30-60 min. Other CI checks are usually much faster and the Plone Jenkins resources are limited, so when done pushing changes and all other checks pass either start all Jenkins PR jobs yourself, or simply add the comment above in this PR to start all the jobs automatically.

Happy hacking!

MrTango commented 1 year ago

@jenkins-plone-org please run jobs

MrTango commented 1 year ago

With this changes, we return the original image data and store it in the annotation, so that this will not get triggered for every request again, if the image does not have a scale. Fixes: https://github.com/plone/Products.CMFPlone/issues/3678

MrTango commented 1 year ago

@jenkins-plone-org please run jobs

mauritsvanrees commented 1 year ago

This uses the original image for all scales. I think this PR can be replaced with https://github.com/plone/plone.namedfile/pull/136