Image Sequence importing a stack of images out of order

I am having an issue where I am importing a folder of in-order images yet once they are imported the stack is out of order. E.g. the folder has images labeled 0001,0002,0003,0004 where as the stack imports them as 0509,6320,4430,2303. Is there a way to make sure the images get ordered properly?

The order upon import usually depends on the operating system and/or the file system, and ImageJ doesn’t change this order.

If you go via File > Import > Image Sequence…, you’ll have an option Sort names numerically:

Alternatively, you can use Image > Stacks > Tools > Stack Sorter to sort your stack slices by their labels: