Ion-img zoom

I simply connected my machine to Internet. All dependencies got downloaded automatically on running ionic run android and the app build was successful.

cordova plugin list

D:\work\wvdb\wvdb-project\weddingVenueDb>cordova plugin list
com-sarriaroman-photoviewer 1.1.10 "PhotoViewer"
cordova-plugin-console 1.0.5 "Console"
cordova-plugin-device 1.1.4 "Device"
cordova-plugin-inappbrowser 1.7.1-dev "InAppBrowser"
cordova-plugin-splashscreen 4.0.1 "Splashscreen"
cordova-plugin-statusbar 2.2.1 "StatusBar"
cordova-plugin-whitelist 1.3.1 "Whitelist"
ionic-plugin-keyboard 2.2.1 ā€œKeyboardā€

I tried it on my samsung A9 mobile, Android 6.0.1

It keep showing ā€œerror loading image.ā€

No matter it is local image or online image.

Can anyone give me some hints? I have spent a week to find the solution.

import { PhotoViewer } from ā€˜ionic-nativeā€™;

viewFullScreen(imagePath: string, venueName?: string): void {
// hardcode for testing, but still fail to load
imagePath = ā€œhttp://www.sample.com/venue-photo/Four Seasons Hotel/photo/1 HKG_second-floor_floorplan.jpgā€;
// imagePath = ā€˜assets/images/1.jpgā€™;
venueName = ā€˜titleā€™;
PhotoViewer.show(imagePath, venueName, {share: false});

}
HTML
< img src=ā€œassets/images/button2.jpgā€ (click)=ā€œviewFullScreen(ā€˜imagepathā€™)ā€ />

1 Like