How can the order of multiple images (more than 2) be kept when drag-and-dropping in Writer?

I’m noticing that I cannot select more than one image file at a time via the “Insert/Picture/From File…” menu option. However, I can do it if I select the files in a file browser (e.g. Caja in Ubuntu/Mint Linux) and drag them to my open document in Writer. Writer places the images starting at the cursor position - exactly what I’d expect.

My issue is that when I have 3 or more images selected, Writer will place the first image at the cursor location and the rest will be placed in reverse order. The order used in this case being file name.

So for example, if I have multiple files of “image1.jpg”, “image2.jpg”, “image3.jpg” and drag them from the file browser to my open document, Writer will place “image1.jpg” at the cursor location and then place “image3.jpg” after that and then place “image2.jpg” last. This happens in this fashion for any insert of greater than 2 images.

Is there a way to change this behavior? I have an external script that I run to size the photos and name them correctly so that they are in filename/alphabetical order in the directory on disc which is the desired order for them to placed within Writer.

Thank you!

This may be absolutely useless, but: there is a similar bug I have encountered in MS Office / Windows. When a list of files is selected the last one is put at the top in some applications. The workaround there is to select from the bottom up instead of the top down. In other words, click on image3, then shift click on image1 rather than the usual click on 1 and shift click on 3. Should at least be worth trying.

I am going to mark this answer up even though it may not be a solution as I too have experienced this behaviour.

I don’t know if there is a fix to your problem, but can I suggest a temporary work-around? Make a copy of your script and edit it so that it sorts the files in descending rather than ascending order. After you run your original script against your files, move the first file to a temporary folder. Next run the new “descending-script” against your files. Then move your first file back to position-one in your folder. Now you can do your “Caja in Ubuntu/Mint Linux” thing and the files should be in the ascending order that you desire.

Good luck with your fix.

I discovered that you can insert more images if you place them in different parts of the text.