My list is ordered by increasing size of smallest dimension. We don't want to pick the image with the largest width, since that would result in us selecting things like graphical horizontal lines (e.g., 600x1) for some notes, which isn't very useful. No, we choose the image with the largest smallest dimension. To keep my list sorted by increasing size of smallest dimension, your new entry should be third: 75x100 100x400 150x250 200x300 So we're going to pick the last one again (200x300), because it's still the image with the "largest smallest" dimension. It does make sense sometimes, but it doesn't make sense a significant number of times too. Some part of the algorithm needs to factor in the dimensions and/or sizes of the images or else you end up with non-useful thumbnails (see 600x1 example above).