This does not immediately strike me as a very good idea. You'd want images to be served by a webserver that is good at serving static content, not by a webapplication that has to pull every request through a few layers of logic. So I would recommend looking for another solution, hosting the images elsewhere and uploading them there from the Mendix application.
If I understand correctly, the images will not be retrieved from your Mendix application by customers using the site, but will be retrieved by another system. Will the other system do this only periodically? In that case, performance is not an issue and you could create a custom requesthandler to serve these images.
Alternatively, you could, as part of a Java action, write these images to any folder, that you would make accessible by web as part of you webserver configuration (only works for an on premise installation).
By the way, isn't a REST get request basically the same as a direct link?
Depending on the need to secure these images a request handler that skips all the checking but does give you some extra options to resize the image and then cache it could do the trick.