If you’re on Tiger, wrap your sort in a ‘considering numeric strings’ block:
on _sort(k, a, b)
if a ≥ b then return
set p to item b of k's lst
set l to a
set r to b - 1
repeat while l ≤ r
repeat while l ≤ r and item l of k's lst ≤ p
set l to l + 1
end repeat
repeat while l ≤ r and item r of k's lst ≥ p
set r to r - 1
end repeat
if l < r then
set {item l of k's lst, item r of k's lst} to {item r of k's lst, item l of k's lst}
end if
end repeat
set {item l of k's lst, item b of k's lst} to {item b of k's lst, item l of k's lst}
_sort(k, a, l - 1)
_sort(k, l + 1, b)
end _sort
on sortList(theList)
script k
property lst : every item of theList
end script
_sort(k, 1, length of k's lst)
return k's lst
end sortList
set theList to {"2.jpg", "19.jg", "11.jpg", "3.jpg", "25.jpg", "9.jpg", "1.jpg", "20.jpg", "18.jpg", "4.jpg", "22.jpg", "5.jpg", "23.jpg", "6.jpg", "24.jpg", "7.jpg", "26.jpg", "8.jpg", "10.jpg", "17.jpg", "16.jpg", "15.jpg", "14.jpg"}
considering numeric strings
set sortedList to sortList(theList)
end considering
--> {"1.jpg", "2.jpg", "3.jpg", "4.jpg", "5.jpg", "6.jpg", "7.jpg", "8.jpg", "9.jpg", "10.jpg", "11.jpg", "14.jpg", "15.jpg", "16.jpg", "17.jpg", "18.jpg", "19.jg", "20.jpg", "22.jpg", "23.jpg", "24.jpg", "25.jpg", "26.jpg"}
HTH