For one of our customers I had to integrate with the AFAS imageconnector endpoint /imageconnector/{imageId}?format={format}.
This endpoint returns in a json message with the image as a base64-encoded string property, in addition to the mimetype for the image: