Page MenuHomePhabricator

Image size filter for Media Search
Closed, ResolvedPublic


As a Commons user, I want to be able to filter image search results by image size so I more easily find an image that's the size I'm looking for.

Acceptance Criteria:

  • An "Image Size" filter is added that allows users to only see results that are within a range of resolutions
  • The image size filter should only appear on the Images tab.
  • The image size filter should have the following options:
    • "Any" - all images
    • "Small" - resolution < 500px
    • "Medium" - resolution between 500 and 1000px
    • "Large" - resolution > 1000px
  • The image size filter should match the following design on desktop. This task does not cover the mobile UI (this will be done as part of T258615)

filters.jpg (755×1 px, 335 KB)

Event Timeline

Change 621104 had a related patch set uploaded (by Anne Tomasevich; owner: Anne Tomasevich):
[mediawiki/extensions/WikibaseMediaInfo@master] Add Image Size filter

@mwilliams there's a UX issue with the filters I was hoping you could weigh in on. The image size filter is supposed to have an "Any" option, which will display images of all sizes. This is the default value, obviously. However, the filter itself is supposed to display the label "Image size" when the default value is selected. The user also needs to be able to reset the filter to the default state.

I can think of 2 ways to do this:

  1. Show "Any" in the dropdown, but if when selected, show the label. This is what happens on Google image search when using the special tools. This could potentially cause some confusion if the user selects "Any" but then the filter shows "Image size" an instant later. I'm hoping this can be mitigated by using the primary blue color for the filter when a value is selected and base-10 when it's in the default mode.
  1. Add some kind of clear button, either per-filter or for all filters

What do you think?

cc @egardner

Personally I think the first option will be clear enough, and saves us from having to introduce yet-another button/icon/UI element.

Change 621104 merged by jenkins-bot:
[mediawiki/extensions/WikibaseMediaInfo@master] Add Image Size filter

Etonkovidova added a subscriber: Etonkovidova.

Checked on commons wmf.6.

All looks according to the specs (and the specs have been marked in the description as done). There are couple of notes that might need to be followed up:

  • the mismatch in the number of displayed images when the Image size filter (Small, Medium, Large) is selected along with File type and when Any Image size is selected with the File type - filed as T261365
  • "Image size" term - is it resolution or image size or the file size? For example, this image has been classified as Small:

GreatBasinBristleconePine.jpg ‎(583 × 394 pixels, file size: 296 KB, MIME type: image/jpeg)

@Etonkovidova I can respond to the first two items:

  1. I wasn't able to reproduce this and left you a message in that ticket. If it's still happening on your end we'll need to investigate more; I'm not sure what could be causing it yet.
  2. It's resolution, which is the square root of the image width x height. There are other ways we could determine what "image size" means, so we can change this if needed!