Skip to content

Cropping informations are not cleared after an image change #156

Description

@laulaz

Steps to reproduce :

  1. Add an image on a content
  2. Crop this image with plone.app.imagecropping cropping editor
  3. Change the image for something else
  4. The croppings informations are not cleared, and the resulting scale(s) are still cropped on the new image (on a "random" area, depending on the old image)

Of course if the cropped scale is shown on your content view, you can see the problem directly (and re-crop the image manually), but if it is not the case (ex: scales used elsewhere), you can get very awkward results !

We should IMHO use a subscriber to get changed image fields and clear the cropping annotation storage for that fields when this happens.

@petschki @MrTango what do you think ?

Demo with plone.app.imagecropping 3.0.3 :

20231025_032704937.mp4

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions