Use Mendix as imagebank for a webshop

0
We have built a PIM system storing product information and related images of products. We are currently sending this data to a (magento) webshop. I am currently sending them the images through a REST service for them to download, however they would rather use direct links to the images. So for example: www.testapp.mendixcloud.com/images/RedHouse.jpg or something similar. Is something like this feasible and Mendix, and is it a good idea to solve it in such a way? The image should preferably be rescalable aswell
asked
3 answers
1

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.

answered
1

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?

answered
0

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.

answered