Settings
Last updated
Last updated
Ansel is compatible with the following contexts, and regardless of the context uses the same settings presented as uniformly as possible.
Ansel is compatible with ExpressionEngine's new File Manager added in version 7. It supports sub-folders or compatibility mode (no sub-folders). Ansel 3.0 no longer supports Assets or the Treasury modules. ExpressionEngine's new File Manager is extremely robust and is the recommended path forward for the best experience. You can read more about this change in the FAQs.
The first two settings for any Ansel field are very related and require a tiny bit of explanation.
The Upload directory is where source images are drawn from or uploaded to. It is meant to be a user facing directory — the one your users will see when they add an image to an Ansel field.
The Save directory is where Ansel saves images the user crops or otherwise adds to the field. The end user should not ever need to see this directory. Ansel names the files with image IDs and timestamps for cache breaking purposes and so on when the user updates the images in any field.
The Preview directory is where Ansel saves images when viewing an entry in Live Preview mode. The contents of this directory are temporary, and when an entry is saved the contents of the directory are deleted. You can use the same directory for all Ansel fields, or create a unique directory for each field. If a user previews an entry and does not save it, then the images will not be deleted, and this is fine. The next time any entry using an Ansel field is saved the previous preview images will be removed even if they are not used in the entry.
There are a few different approaches and ways of thinking about this. You could create a source and save directory for each field and keep everything separate, or you could create one general upload directory for all source images, and a save directory for each field. Either approach has its merits. Either way, it is highly recommended that you create a save directory for each field you create. This allows you to keep your images well segregated and create unique image manipulations per directory and field as well.
Tile View is the new default layout introduced in Ansel 3. It is a more compact view that is more mobile friendly and more subitble to fields that include a lot of images. Disabling it will revert to the legacy vertical table layout.
Each Ansel field can hold any number of images, and these settings allow you to define how few and how many images a field can hold.
If tile view is enabled, max is set to 1, and prevent uploads when max quantity is enabled, Ansel will be put into single image view mode, which automatically displays the meta fields if enabled and removes the ability to toggle their display. The Cover metafield will also be disabled. If you're displaying only 1 image then there is no group of images it needs to be differentiated from as a cover.
Set the JPEG quality from 1 to 100.
It is not normally a good idea to set the quality to 100. Anywhere from 70 to 90 is usually a good area to be in terms of quality vs. file size.
Normally, image files are manipulated and saved in their original format. However, if you want all images to be saved as JPEG, you can specify so with this setting.
When set to yes, the dimensions you enter for min/max width/height below will all be doubled. This allows you to set dimensions based on how you would think or normally specify dimensions in CSS, but doubles those dimensions so that your images will be retina ready.
Use these fields to define image dimension requirements. Ansel will ensure that the image the user selects is at least as large as the minimum dimensions specified and that they cannot select a crop smaller than that. And Ansel will resize the image to meet the maximum specified size if the user selects a crop are that is larger than specified.
Enter a crop ratio to make sure the image is constrained to a certain aspect. The ratio is entered as 16:9, where the first number on the left side of the colon is the width of the ratio, and the number on the right side of the colon is the height of the ratio.
There are three optional fields that can be set to show or hide, required, and the label of the fields can be customized. The title and caption fields are text input fields, and the cover field is a checkbox. Only one can be selected per field.
Ansel has some settings that are only controlled via the config.php
file.
Disabled by default, but if you want the Title and Description meta fields in Ansel to stay in sync with the Title and Description field in the File Manager enable this setting.