This article explains how to set up a dropdown list attribute, containing predefined sizes such as 'Small', ''Medium', 'Large' and 'Print', which correspond to the number of pixels in the largest dimension of the image.
This is also useful as a filter to remove low-resolution images that are not appropriate for print.
- Go to Admin > Attributes and click 'Add a new attribute'.
- Create the new attribute as type 'Dropdown' and call it 'Image Size' or similar.
- Make sure that 'Searchable' is ticked in order to show the dropdown on the Advanced Search page.
- Adjust any of the other options and click 'Save'.
- Back on the Admin > Attributes page, find the 'Image Size' attribute and click 'Edit list values'.
- Add values for the dropdown, such as 'Small', 'Medium', 'Large' and 'Print'. For each, enter a value for the field 'IPTC/EXIF Mapping' to define the range of pixels that should match this dropdown entry (this field can start with <, <=, > or >= and can contain & (for AND) and | (for OR). For example, you could add the following values (this list shows 'Name':'IPTC/EXIF Mapping'):
- Small: <=500
- Medium: >500&<2000
- Large: >=2000&<5000
- Print: >=5000
- If you are using Asset Types, make sure you enable the 'Image Size' attribute for all relevant Asset types by editing them in the Admin > Asset Types area.
- Now that your new attribute is configured go to the Admin > Attributes > Embedded Data Mappings area.
- Add a new embedded data mapping with the following:
- Attribute: 'Image Size'
- Embedded data type: [Other]
- Embedded data value: Max(width,height)
- Mapping direction: Upload
- At the top of the Embedded Data Mappings page click 'rerun metadata extraction for existing assets'.
- Check the new embedded data mapping you've just set up and click 'Run extraction'.
The above steps explain how to set up the image sizes according to the largest dimension of the image. Alternatively, you could use the total number of pixels in the image, by setting appropriate values in the 'IPTC/EXIF Mapping' fields for the dropdown values, and setting up the embedded data mapping using the field [Other]->Pixels (width*height)