Comments (16)
@sarriaroman Hi there, nice to see you here. Firstly, thanks for the plugin in the first place. I understand what you're saying but:
-
Users are not generally interested in submitting pull-requests for these plugins. We use them precisely because we don't want to spend the time ourselves coding these things, so we can get on with our apps. That's why we appreciate them so much.
-
Reducing the size of the image is not the answer. The answer is to figure out why it crashes and avoid it. A 200kb image is nothing compared to standard photos of 1MB and upwards.
-
Totally understand that you're busy with work, as are all we, which is why we choose excellent plugins to help us get on with our work too. But this issue was raised 7 months ago and this is the first time you've said anything here, so forgive any of us for feeling disillusioned.
Hopefully you'll be able to help us out. Why don't you set up a donation button or something on your webpage. I'm sure many of us would gladly help you out in return for your time maintaining the plugin code. FREE BEER!
from photoviewer.
As an temporary [or not] and quick alternative, i've used another module:
- npm install --save ionic-img-viewer
Then I use the imageviewer directive in the img :
- <img class="selected-picture" [src]="base64url" imageViewer>
When you touch the image, it opens the image in a fullscreen view.
This is where I found that solution : https://ionicacademy.com/building-ionic-image-gallery-zoom/
By the way, I wish I could correct the issue with PhotoViewer myself, but I fear I don't have the required knowledge.
from photoviewer.
same issue for me
from photoviewer.
Same for me, the app completely crashes everytime when calling the method .show giving a base64 string as source image larger than 200kb.
Ionic version 2.2.1
from photoviewer.
Any solution to this yet?
from photoviewer.
from photoviewer.
@daveshirman Found any alternative to this?
from photoviewer.
from photoviewer.
@daveshirman
I used canvas to resize the image and achieve a size lower than 200kb but images have an almost unacceptable quality to preview, tried to find an alternative unsuccessfully because you actually can view URL given images of 4k+
So I finally lasted them with that almost unacceptable quality (you can watch that photos nicely from a normal mobile phone but from a 10" tablet the image turns very poor) will try something different or a plugin to succesfully compress images without loosing so much quality when I have time
from photoviewer.
@Kalamede Just had a thought, what if:
- Select an image to view.
- Immediately create a temporary FILE from that image on disk
- Send the URL of that file to the plugin
If you say it can handle urls up to 4k (i.e. plenty big enough), would that work and overcome the kb issue?
This should help:
from photoviewer.
@daveshirman That's what I though and it is what I'm going to try when I have time, the bad side is maybe an small loading time added
from photoviewer.
@Kalamede show a loading spinner. It will be fine and no one will care if it works.
from photoviewer.
Have you guys tried the temporary file solution? Did it worked?
from photoviewer.
I gave up on this ages ago as the developer clearly isn't interested in maintaining the code. If you found a solution, please post it here. Thanks.
from photoviewer.
I have interest, maybe you need to have it too, you can solve it and create a Pull Request. The code is open to be changed, I'm very open to introduce changes made by the community, but I'm messed with work right now to check how to solve the issue. Maybe I will be able to find a solution next week.
One question, did you ever tried to reduce the size of the images you are loading? Big images are not good for the memory that is why is crashing, do you need such a big image? Can you try some kind of middleware to compress the image depending on the device resolution? It's a solution that I normally use to avoid making my apps crash.
from photoviewer.
use ion-img instead of img
works for me
from photoviewer.
Related Issues (20)
- remove title, keep options
- swipe between images HOT 2
- Android Build Failed with Duplicate Class
- Change Button Close Position HOT 1
- Ionic5 - not compatible? HOT 5
- PhotoViewer is Error HOT 5
- Why this file content is 1.2.4 ??? HOT 1
- header is not used in plugin anywhere HOT 1
- This plugin should not depend on jCenter for Android builds
- compile removed in Gradle 7 HOT 1
- Is the Photoviewer only for Cordova projects? HOT 7
- Not working with Capacitor 4 and Android 12
- Build fails - Cordova@11 android@11 HOT 8
- 1.3.0 HOT 3
- v1.3.0 not available for install HOT 11
- Could not find com.commit451:PhotoViewsquareup.picasso:picasso HOT 3
- PhotoViewer not passing provided headers on Android HOT 2
- Rare chrashes where mArgs causes a null pointer exception
- Android 13 support - PhotoViewer unable to open image as permission changed HOT 5
- not working in android 13
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from photoviewer.