BoldMinded acquires Ansel, support ending for all add-ons. BoldMinded acquires Ansel, support ending for all add-ons. Read More →
Support has been discontinued. Issues remain available as an archive. Support has been discontinued. Issues remain available as an archive.
deleting images in the images directory when deleting them in the entry?
#119 opened by Büro Ballmann Weber
Description
hi buzzingpixel,
we noticed that ansel doesn’t delete the original and generated images in the image directory when we delete the image in an entry.
is that how it's supposed to be?
this way, even in a short time, deleting some images and adding new ones in some entries creates a big chaos in the images folder.
kindest regards, matthias
Replies
- TJ Draper
Replied 9/6/2018 11:06 AM, Edited 11/10/2018 9:46 AM
Hello,
Ansel has two different storage directory settings for each field, the Upload Directory and the Save Directory.
The Upload directory is not an Ansel controlled directory, but it is where images are drawn from or uploaded to. This works very much like the native file field. Once the file is uploaded, you'd need to remove it from that directory in the file manager since Ansel does not control that directory.
The Save directory is a directory Ansel manages and is not meant to be seen by users of EE. It should be hidden from your CMS user group(s). Ansel will add images to that directory when an image is added to a field, and remove any images it has generated from that directory whenever an image is removed from an entry, or an entry containing images is removed, etc.
In any event, you should never use the same directory for Upload and Save because that can certainly create all kinds of confusion. And you should never manually remove or otherwise manipulate images in a directory used as an Ansel save directory.
See this segment of the documentation: https://buzzingpixel.com/software/ansel-ee/documentation/field-type-settings#uploadSaveDirectories
- Büro Ballmann Weber
Replied 9/6/2018 12:40 PM, Edited 11/10/2018 9:46 AM
Hi TJ,
Thank you very much for your detailed explanation! That really helps a lot!
We actually use two directories, an upload directory and a save directory. But I didn't realize until now that after adding pictures via fields in EE you can delete them from the upload directory.
So the upload directory only serves as an upload vehicle - and even if you add new resolutions and Ansel has to recalculate them from the original, can it do that from the copy in the upload directory?
- TJ Draper
Replied 9/6/2018 12:42 PM, Edited 11/10/2018 9:46 AM
No, the images Ansel creates for a field image are of the image's crop and size, the original is always drawn from for resizing when a user goes to edit the field. If you delete the source image, the image will no longer be editable.
- Büro Ballmann Weber
Replied 10/10/2018 8:02 AM, Edited 11/10/2018 9:46 AM
hi tj,
regarding the folder structure of ansel: During the development we had the case that our client uploaded many images and later replaced them with others, so that now there are a lot of images in the directories that are no longer needed. So what would be the best way to recalculate all the images currently in use and delete the others?
kindest regards, matthias