Search docs/
Native SolutionsCore Device

Photo Viewer

This plugin can display your image in full screen with the ability to pan, zoom, and share the image.

https://github.com/sarriaroman/photoviewer

Stuck on a Cordova issue?

If you're building a serious project, you can't afford to spend hours troubleshooting. Ionic’s experts offer premium advisory services for both community plugins and premier plugins.

Contact Us Today!

Installation

ionic cordova plugin add com-sarriaroman-photoviewernpm install @ionic-native/photo-viewernpm install com-sarriaroman-photoviewernpm install @ionic-native/photo-viewerionic cap sync
Ionic Native Enterprise comes with fully supported and maintained plugins from the Ionic Team. Learn More or if you're interested in an enterprise version of this plugin Contact Us

Supported Platforms

  • Android
  • iOS

Usage

Using React? See here.

import { PhotoViewer } from '@ionic-native/photo-viewer/ngx';

constructor(private photoViewer: PhotoViewer) { }

...

this.photoViewer.show('https://mysite.com/path/to/image.jpg');

this.photoViewer.show('https://mysite.com/path/to/image.jpg', 'My image title', {share: false});

this.photoViewer.show('https://mysecuresite.com/path/to/image.jpg', 'My image title', {share: false, headers: '{username:foo,password:bar}'});