Skip to content

Loading…

determine whether to use croppinginfo or autocropped scales #30

Closed
petschki opened this Issue · 11 comments

3 participants

@petschki
Plone Collective member

if you have a listing with auto cropped scales (eg: scales.scale("image", scale="mini", direction="down") and you want to crop only one image of those, you can't, because the autocropping direction="down" will override the saved cropped scale.

@petschki
Plone Collective member

well not only listings of course :)

@frisi
Plone Collective member

for the record: i'm using https://github.com/collective/archetypes.clippingimage for automatically cropped scales as a workaround in one project.

it only supports AT (afaik) and only image access via image_ traverser (might be easy to solve), though.

as - contrary to the promise (make this package as minimally invasive as possible) in the readme - we already started to overwrite plone.app.imaging's views in this package i'd rather go and add auto-crop support there too (maybe in a separate package that can be activated by an extra eg plone.app.imagecropping[autocrop])

@petschki
Plone Collective member

so this would solve my issue as described nearly 2 years ago ... af16f89

@agitator
Plone Collective member

so "autodown" will use the predefined crop now, if it exists?

@petschki
Plone Collective member

Yep... But right now only for dexterity content types.

@petschki
Plone Collective member

I'm rethinking this today ... maybe it's better to override the 'down' direction, so integrators don't have to adapt existing templates. The main purpose of the 'down' direction is for cropping, so if we get a p.a.imagecropping cropped scale we can savely deliver it instead of standard 'down' behavior ... @frisi @agitator your opinions?

@agitator
Plone Collective member

cool!

yes, was thinking why the extra option - would use the manual crop first if exists and the automatic crop as fallback

@petschki
Plone Collective member

yep ... see #66

@agitator
Plone Collective member

nice! i'll buy you a beer in Bucharest ;-)

@petschki
Plone Collective member

:+1: abgmacht :)

@frisi
Plone Collective member

i think it's perfectly fine to re-use the 'down' direction and deliver a crop defined by plone.app.imagecropping if it has been defined. i'll comment on PR #66

@petschki petschki closed this in 2858823
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.