How to display an image in a web app
Hi RapidMiners,
this is kind of a noob question, but I haven't been able to solve it. I have images, both as jpg files and URL, that I want to display in a web app. I hava tried the following without success:
* Upload the jpg file to the server with the Store operator, then use the Image component.
* Create an External resource component. Embed as image and copy paste the URL.
While writing the post, I've remembered that I could display it through HTML, but given the fact that we have Image and External resources components, I would like to be able to use them.
Your help is kindly appreciated!
Answers
-
Hi @SGolbert,
both solutions work for me.
For the Image component make sure that you have stored the image with the correct MIME type - then you should be able to select the file and it should work!
The best way is to use the Operator Write File with the resource type repository blob entry. There you can enter the correct MIME type manually. For already stored objects you may instead change the MIME type manually in the Web Interface of RapidMiner Server.
For the External resource component you should embed the image as IFRAME and enter the full Image link there.
Happy Mining,
Edin
5 -
Hello Edin_Klapic. Could you please provide for a step by step on how you would do that you advised in your last post?
I'm trying to follow along with the lesson at rapidminer academy pertaining web apps. You may find the link at: "
In there the instructor used the stored the image in the following location: "<img src='/internal/rest/resources/public/images/face-worried.svg'>". Do you know where I can find that location in rapidminer server?
Thanks
2 -
Hello @Edin_Klapic ! I would like to ask you if it is possible to upload a jpg image after a process in web app? If yes, how can I?
1 -
Hi @joeanalytica and @mbsls ,Sorry for answering so late but something got messed up with my community notifications and I did not receive your questions.@joeanalytica the location does not exist. You would need to create the folder yourself and store the desired files there. Also some folder permissions might be needed to be adapted.@mbsls uploading / storing and afterwards displaying is easily doable.I would like to make it detailed so it might take 1-2 days. Stay tuned.Happy mining,Edin4
-
Thank you very much @Edin_Klapic for your reply. I finally uploaded a jpg image after my process in web app. I would also like to ask you if it is possible a user to input an image file to my rm web app. I have created a process in HTML form and I would like to create a process which receives the uploaded image file and store it as jpg or png and then to use it for my process.
Thank you in advance1