I worked with one of our interns on developing a pretty simple workbench that queries records from a REST service using a project #, styling the popups and icons, and writes it out to a KML that is then downloaded from FME server using the data download service. I have exposed the attachment from ArcGIS Online and have the process worked out for converting them to base64.
The next part that I'm needing help with (why I posted this) is determine the best way to embed the photos in the popup, which are varying content subtypes of image (image/png, image/jpeg, image/jpg, etc). I've attempted (unsuccessfully) to embed the base64 image in html, but it doesn't seem to load. I think the best way would be to save the images in a folder, and somehow reference the local image path in the kml popup... Both the KML and Images would be downloaded through the published data download service.

Here's the workflow that I used... Useful for when working with ArcGIS Online, ArcGIS Portal, or ArcGIS Server REST services with attached attachments. I forgot I had done this previously but for emails. You may need to initially click on the images and login to AGOL/Portal/Server when using this method, but it works pretty well, you don't have to worry about images and this is the easiest way to deal with security. There is a private parameter that I set (ServiceURL) that points to the service, to allow ultimate flexibility. In the attached screenshot, the /0/ refers to the layer # that can be found within the REST service.