Hi Peter,
If you are keen on extending the functionality of your module then you could modify the code and add the following logic after setting the main payload:
1) Loop and pick up each JPG file
1a) Create a new binary payload by calling the factory method Message.createPayload()
1b) With the new Payload object returned by 1a), call setContent with the binary byte array
1c) With the new Payload object returned by 1a), call setName with the JPG file name
1d) With the new Payload object returned by 1a), call msg.addAttachment with the payload object
Your receiver will now need to handle attachments however so you will probably need to introduce a mapping.
Hope this helps. Let us know how you go with it.
Regards,
Nick