Although the author of the question specifies the need to use command line because of the high number of image files, I have to say that the comment made by Tom Brossman related to LibreOfficeWriter is the best answer to the question, because it includes the solution to a nasty problem (presented below) that may appear especially when dealing with many images.I stumbled upon this problem and tried a few options - from the Termial, using Gimp and such, and using the 'printing as file' feature, but have to conclude that the 'drag and drop'+'Export as PDF' in LibreOfficeWriter is the best, because:
1) you can already see before exporting images as pdfs if there are any differences between these images as they will appear in the final pdf. What I mean is that despite similar sizes in bytes and aspect ratio, when importing jpeg-s or png-s into a pdf, some pages may appear much smaller than the others, without any difference in quality in fact, but just because they seem to be 'focused' differently and displayed at a different scale. (I cannot understand the cause of this and welcome a comment that would enlighten me, I just stumbled into this when putting very similar images into a pdf file, as seen below.)
When looking at the images before converting them into a pdf, you cannot anticipate this error, but LibreOfficeWriter makes it visible and also very easy to correct: just grab the margin of the image, put it into the appropriate form into the page, and it will appear as such in the final pdf.
2) And, when exporting ('File'- 'Export as PDF...') you have several options that let you control the final quality/size of the pdf, which could be very useful if you need to send it by mail and still keep some image quality.