How to set up search by image size

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.

  • Go to Admin->Attributes and click 'Add a new attribute'. Create the new attribute as type 'Dropdown' and call it 'Image Size' or similar. Click 'Show on search' to show the dropdown on the 'advanced search' page.
  • Add values for the dropdown, such as 'Small', 'Web' 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&<1000
    • Large: >=1000&<2500
    • Print: >=2500
  • Go to the tab 'Embedded Data Mappings'. Create a mapping from the field [Other]->MAX(width,height) to your new field.

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)


Was this article helpful?

Yes No

Thanks for your feedback!