ionic-framework icon indicating copy to clipboard operation
ionic-framework copied to clipboard

Slides transition breaks with base64 images

Open Jai-Krish opened this issue 10 years ago • 6 comments

Short description of the problem:

Slide transition breaks while using base64 encoded image in ngSrc.

What behavior are you expecting?

Smooth slide transition.

Steps to reproduce:

  1. Capture images using camera plugin with destinationType: 0
  2. Pass the array of images into the modal with slides
  3. Use the img tag to display the base64 encoded images

2.0.0-beta.6

Run ionic info from terminal/cmd prompt: (paste output below) Cordova CLI: 6.1.1 Gulp version: CLI version 3.8.11 Gulp local: Local version 3.9.1 Ionic Version: 2.0.0-beta.6 Ionic CLI Version: 2.0.0-beta.21 Ionic App Lib Version: 2.0.0-beta.11 OS: Windows 7 SP1 Node Version: v4.2.4

Jai-Krish avatar Apr 26 '16 09:04 Jai-Krish

Hello! Thanks for opening am issue with us! What exactly breaks in the transition? Is it just laggy?

jgw96 avatar Apr 26 '16 15:04 jgw96

Yes the transition stops in the middle and the consecutive swipes moves the slide by few pixels.

Jai-Krish avatar Apr 28 '16 05:04 Jai-Krish

OK, that's what I thought. So yeah using base64 images can be really heavy on your memory usage and can easily lead to your application slowing down or basically crashing, as it sounds like your app is. Are you using the Cordova camera plugin? If so I would recommend using the FILE_URL to grab your pictures. That will not eat up your memory like base64 images will.

jgw96 avatar Apr 28 '16 14:04 jgw96

Im gonna go ahead and close this issue as i believe the above should fix it, if not feel free to comment and ill repoen!

jgw96 avatar Apr 28 '16 19:04 jgw96

Initially I've had problems using FILE_URL because of Access permission but now it has been resolved by adding the tag <allow-navigation href="file://*/*" /> in config.xml. Thank you.

Jai-Krish avatar Apr 29 '16 06:04 Jai-Krish

@Jai-Krish Awesome! No problem! Thanks for using Ionic!

jgw96 avatar Apr 29 '16 14:04 jgw96