Is it me making things complicated, or is indeed complicated to remove an image from an image field?
So my questions/concerns are: we have a certain content type that has the usual plone.namedfile.field.NamedBlobImage
field.
We are meant to do a clean up on that field, not delete the field, but rather the images stored in them.
On of my co-workers did an upgrade step to go through all those objects from that content type and do:
for brain in brains:
obj = brain.getObject()
obj.image_field = None
transaction.commit()
With that, on the next database packing, the physical images on the filesystem will be removed? What about image scales, they are stored in an annotation, right? Are we meant to clean up that manually?
What's the default z3c.form
doing when one selects the option to remove the image there? I haven't had a look at that, where this code lives actually?