Need help upgrading to Ionic Framework 4.0? Get assistance with our Enterprise Migration Services EXPLORE NOW

Photo Viewer

Improve this doc

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

Repo: https://github.com/sarriaroman/photoviewer

Installation

  1. Install the Cordova and Ionic Native plugins:
    $ ionic cordova plugin add com-sarriaroman-photoviewer
    $ npm install --save @ionic-native/photo-viewer@4
    
  2. Add this plugin to your app's module

Supported platforms

Usage

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

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});

Instance Members

show(url, title, options)

Shows an image in full screen

Param Type Details
url string

URL or path to image

title string
options PhotoViewerOptions

API

Native

General