# Invalid Photo Path when deployed thru Ionic Pro/View

**URL:** <https://forum.ionicframework.com/t/invalid-photo-path-when-deployed-thru-ionic-pro-view/131060>\
**Category:** Appflow\
**Created:** [May 22, 2018, 12:04pm UTC](https://forum.ionicframework.com/t/invalid-photo-path-when-deployed-thru-ionic-pro-view/131060 "2018-05-22T12:04:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![saiadeveloper](https://avatars.discourse-cdn.com/v4/letter/s/90ced4/32.png) [@saiadeveloper](https://forum.ionicframework.com/u/saiadeveloper)\
**Post date:** [May 22, 2018, 12:04pm UTC](https://forum.ionicframework.com/t/invalid-photo-path-when-deployed-thru-ionic-pro-view/131060/1 "2018-05-22T12:04:10Z")

</div>

I have a takePhoto function that captures a photo and displays it in my view and it works exactly as expected when I deploy directly to my test device. I deploy thru Ionic Pro and my testers view the app in Ionic View and the photos show as broken images. I’m not seeing any errors and the only difference I can find is in the file path.  
Local deploy:  
file:///storage/emulated/0/Android/data/ **io.ionic.starter** /cache/image.jpg  
Ionic View:  
file:///storage/emulated/0/Android/data/ **com.ionicframework.view** /cache/image.jpg

Using Ionic 3, is there some work-around to fix the file path for Ionic View so my testers can test?  
I found the saveToPhotoAlbum option which does save the photo, but I can’t find a way to directly reference the photo that was just taken. Any guidance or suggestions would be greatly appreciated.

![image](https://global.discourse-cdn.com/ionicframework/original/3X/7/7/77a3db7eaaaead3d68426f440ed814d9b2b4b30d.png)

---

<div class="post-metadata">

**Author:** ![rlouie](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/rlouie/32/134973_2.png) [@rlouie](https://forum.ionicframework.com/u/rlouie)\
**Post date:** [May 22, 2018, 4:04pm UTC](https://forum.ionicframework.com/t/invalid-photo-path-when-deployed-thru-ionic-pro-view/131060/2 "2018-05-22T16:04:42Z")

</div>

It’s not possible with any good method because Ionic View does not include the cordova-plugin-file: [https://ionicframework.com/docs/pro/view.html#plugin-support](https://ionicframework.com/docs/pro/view.html#plugin-support)

Therefore you cannot load anything with a `file:///` path. You could workaround this by using a base64 string of the image instead of the file uri, but this is not recommended and could crash your app. However…if you have to use Ionic View you don’t really have any other choice as far as I know.

You could use a base64 version in Ionic View but a file uri in production?

---

<div class="post-metadata">

**Author:** ![saiadeveloper](https://avatars.discourse-cdn.com/v4/letter/s/90ced4/32.png) [@saiadeveloper](https://forum.ionicframework.com/u/saiadeveloper)\
**Post date:** [May 23, 2018, 7:01pm UTC](https://forum.ionicframework.com/t/invalid-photo-path-when-deployed-thru-ionic-pro-view/131060/3 "2018-05-23T19:01:32Z")

</div>

Thanks for the help.  
I found an acceptable work-around - not using Ionic View.  
Sharing in case it helps someone else…

I created a new build after running this:

cordova plugin add cordova-plugin-ionic --save   
–variable APP\_ID=“xxxxxxxx”   
–variable CHANNEL\_NAME=“AnyChannel”   
–variable UPDATE\_METHOD=“auto”

I emailed the resulting apk to my test device and installed manually allowing installation from unknown sources.  
Each time I push an update, I commit my changes and push to ionic master assigning to my dev channel.  
Relaunch the app and my update loads - and the broken image issue is solved.

This problem seems to be with Ionic View as Pro can still generate a working build with the unsupported plugins.

---

<div class="post-metadata">

**Author:** ![mhartington](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mhartington/32/137757_2.png) [@mhartington](https://forum.ionicframework.com/u/mhartington)\
**Post date:** [July 19, 2021, 9:35pm UTC](https://forum.ionicframework.com/t/invalid-photo-path-when-deployed-thru-ionic-pro-view/131060/4 "2021-07-19T21:35:03Z")

</div>

Closed on July 19, 2021, 9:35pm UTC


