# Webviewer Display of JPG files

**URL:** <https://community.thunkable.com/t/webviewer-display-of-jpg-files/2899461>\
**Category:** Issues / Bugs\
**Created:** [March 17, 2024, 5:15pm UTC](https://community.thunkable.com/t/webviewer-display-of-jpg-files/2899461 "2024-03-17T17:15:02Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![KaneoheKid](https://avatars.discourse-cdn.com/v4/letter/k/d07c76/32.png) [@KaneoheKid](https://community.thunkable.com/u/KaneoheKid)\
**Post date:** [March 17, 2024, 5:15pm UTC](https://community.thunkable.com/t/webviewer-display-of-jpg-files/2899461/1 "2024-03-17T17:15:02Z")

</div>

I’m having a problem with displaying \*.jpg files in the webviewer, at least with Android.  
For the live version on the smartphone companion, when jpg files are stored as assets, i can get a file to display if it is “hardwired” in as a default property for the webviewer, but cannot get get it to display if called from the blocks:

[https://x.thunkable.com/copy/795e00a1e425878f12c732f21b5cda24](https://x.thunkable.com/copy/795e00a1e425878f12c732f21b5cda24)

It work fines with the Preview and as a mobile web app, but not on the smartphone. I’m testing on a Pixel 7 and Galaxy S21. Do i need to show the path to the asset differently?

Tkx

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [March 17, 2024, 5:20pm UTC](https://community.thunkable.com/t/webviewer-display-of-jpg-files/2899461/2 "2024-03-17T17:20:53Z")

</div>

You’re probably using an image url that isn’t publicly accessible as a direct link to the image.

Can you post one of the urls that is having this issue?

**Edit:** yep! You’re trying to use a locally-stored image with a Web Viewer:

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/6/0/60ef00a41652565f757a987eff1b5ec40dd2c4ed.png)

I don’t think you can do that. Also, **why** would you want to do that? You can just use an Image component to show local images.

---

<div class="post-metadata">

**Author:** ![KaneoheKid](https://avatars.discourse-cdn.com/v4/letter/k/d07c76/32.png) [@KaneoheKid](https://community.thunkable.com/u/KaneoheKid)\
**Post date:** [March 17, 2024, 6:23pm UTC](https://community.thunkable.com/t/webviewer-display-of-jpg-files/2899461/3 "2024-03-17T18:23:45Z")

</div>

Thanks for the quick reply @tatiang. First, I wonder why the local jpg calls up just fine when entered as the default for the webviewer (in this case, hardwireWebView) but not when selected? In any case, the reason that i wanted to use the webview is that it allows for pinch/zoom whereas the img component does not.

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [March 17, 2024, 9:42pm UTC](https://community.thunkable.com/t/webviewer-display-of-jpg-files/2899461/4 "2024-03-17T21:42:40Z")

</div>

I don’t know why it worked for one but not the other. It should not work for either. I guess you got lucky but again, you really need to use cloud-based urls if you want the web viewer to work consistently.

---

<div class="post-metadata">

**Author:** ![KaneoheKid](https://avatars.discourse-cdn.com/v4/letter/k/d07c76/32.png) [@KaneoheKid](https://community.thunkable.com/u/KaneoheKid)\
**Post date:** [March 17, 2024, 10:10pm UTC](https://community.thunkable.com/t/webviewer-display-of-jpg-files/2899461/5 "2024-03-17T22:10:12Z")

</div>

Thanks again, I appreciate the input and will use IMG. For my particular application, it needs to work offline so grabbing from the cloud isn’t an option but i can make due with the image component. 😄

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [March 17, 2024, 11:57pm UTC](https://community.thunkable.com/t/webviewer-display-of-jpg-files/2899461/6 "2024-03-17T23:57:01Z")

</div>

Well, I came up with three options, none of which are perfect but one of them might work for you:

1. Convert each image to a PDF and display it in the PDF Viewer in Thunkable. I think this is your best option and it allows for pinch zoom.

2. I managed to enable pinch zoom on my iPhone in Thunkable Live using this javascript but only for cloud-hosted urls: [Pinch and Zoom with native JavaScript](https://apex.oracle.com/pls/apex/vmorneau/r/pinch-and-zoom/pinch-and-zoom-js). I couldn’t figure out the local path to the file.

3. I tried to do this with sprites which is a constraint and it doesn’t allow pinch gestures: [User resize the image - #2 by tatiang](https://community.thunkable.com/t/user-resize-the-image/1058158/2)
