# How to show JPG image stored on Apache Tomcat in Perspective view

**URL:** <https://forum.inductiveautomation.com/t/how-to-show-jpg-image-stored-on-apache-tomcat-in-perspective-view/59352>\
**Category:** General Discussion\
**Tags:** ignition81, perspective\
**Created:** [May 9, 2022, 10:42am UTC](https://forum.inductiveautomation.com/t/how-to-show-jpg-image-stored-on-apache-tomcat-in-perspective-view/59352 "2022-05-09T10:42:30Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![sharmila.belvalkar](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/sharmila.belvalkar/32/30067_2.png) [@sharmila.belvalkar](https://forum.inductiveautomation.com/u/sharmila.belvalkar)\
**Post date:** [May 9, 2022, 10:42am UTC](https://forum.inductiveautomation.com/t/how-to-show-jpg-image-stored-on-apache-tomcat-in-perspective-view/59352/1 "2022-05-09T10:42:30Z")

</div>

The image can be viewed in a browser when the http URL is hit. How to show it in an image component in perspective?

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [May 9, 2022, 11:03am UTC](https://forum.inductiveautomation.com/t/how-to-show-jpg-image-stored-on-apache-tomcat-in-perspective-view/59352/2 "2022-05-09T11:03:24Z")

</div>

> [@sharmila.belvalkar](#):
>
> the http URL

Like example two?  
[https://docs.inductiveautomation.com/display/DOC81/Perspective+-+Image](https://docs.inductiveautomation.com/display/DOC81/Perspective+-+Image)

---

<div class="post-metadata">

**Author:** ![sharmila.belvalkar](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/sharmila.belvalkar/32/30067_2.png) [@sharmila.belvalkar](https://forum.inductiveautomation.com/u/sharmila.belvalkar)\
**Post date:** [May 9, 2022, 2:32pm UTC](https://forum.inductiveautomation.com/t/how-to-show-jpg-image-stored-on-apache-tomcat-in-perspective-view/59352/3 "2022-05-09T14:32:14Z")

</div>

The image URL is having HTTP whereas the perspective page is loaded over HTTPS, therefore the request is upgraded to HTTPS and broken image is displayed. When same image URL is provided as a source to the image component on a perspective page over HTTP it is displayed without any issue.

My question is how to display the image over HTTPS. (the requirement is to retrieve the image URLs by querying to a DB, show the table and on click of every row the respective image should be displayed)

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [May 9, 2022, 2:38pm UTC](https://forum.inductiveautomation.com/t/how-to-show-jpg-image-stored-on-apache-tomcat-in-perspective-view/59352/4 "2022-05-09T14:38:02Z")

</div>

> [@sharmila.belvalkar](#):
>
> My question is how to display the image over HTTPS.

They must be served over HTTPS if your Perspective session is using HTTPS. Browsers do not allow [mixed content](https://developer.mozilla.org/en-US/docs/Web/Security/Mixed_content).

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [May 9, 2022, 3:07pm UTC](https://forum.inductiveautomation.com/t/how-to-show-jpg-image-stored-on-apache-tomcat-in-perspective-view/59352/5 "2022-05-09T15:07:13Z")

</div>

That is: You must change however the image is hosted to serve as HTTPS.  
If you’re hosting _within Ignition_ via Webdev this should be easy, just switch your image URLs to HTTPS; if Perspective is working in HTTPS Webdev should be as well.  
If you’re using some external host, you’ll have to figure out how to change it yourself.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [May 9, 2022, 4:02pm UTC](https://forum.inductiveautomation.com/t/how-to-show-jpg-image-stored-on-apache-tomcat-in-perspective-view/59352/6 "2022-05-09T16:02:57Z")

</div>

> [@sharmila.belvalkar](#):
>
> the requirement is to retrieve the image URLs by querying to a DB

You might find my free module helpful in this case:

> [@Automation Professionals' Blob Server Module](https://forum.inductiveautomation.com/t/automation-professionals-blob-server-module/57970):
>
> Automation Professionals is pleased to announce an alpha release of its new Blob Server Module. Available only for Ignition v8.1, here. The Blob Server Module provides a simple way to deliver images, PDF files, or other binary content from a database to your Perspective clients or other web applications. Without needing the WebDev module. All you need is a Named Query that has appropriate security settings and returns a single row with two columns: Content, and ContentType. Modest documentati…

---

<div class="post-metadata">

**Author:** ![sharmila.belvalkar](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/sharmila.belvalkar/32/30067_2.png) [@sharmila.belvalkar](https://forum.inductiveautomation.com/u/sharmila.belvalkar)\
**Post date:** [May 10, 2022, 5:39am UTC](https://forum.inductiveautomation.com/t/how-to-show-jpg-image-stored-on-apache-tomcat-in-perspective-view/59352/7 "2022-05-10T05:39:57Z")

</div>

Got it. Many Thanks!
