client/js/image-support/scaler.js
function(sizes) {
        "use strict";

        sizes = qq.extend([], sizes);

        return sizes.sort(function(a, b) {
            if (a.maxSize > b.maxSize) {
                return 1;
            }
            if (a.maxSize < b.maxSize) {
                return -1;
            }
            return 0;
        });
    }
function(sizes) {
        "use strict";

        sizes = qq.extend([], sizes);

        return sizes.sort(function(a, b) {
            if (a.maxSize > b.maxSize) {
                return 1;
            }
            if (a.maxSize < b.maxSize) {
                return -1;
            }
            return 0;
        });
    }
function ( sizes ) { "use strict" ; sizes = qq . extend ( [ ] , sizes ) ; return sizes . sort ( function ( a , b ) { if ( a . maxSize > b . maxSize ) { return 1 ; } if ( a . maxSize < b . maxSize ) { return - 1 ; } return 0 ; } ) ; }
We want the smallest scaled file to be uploaded first
We want the smallest scaled file to be uploaded first