ionic-team / capacitor

Build cross-platform Native Progressive Web Apps for iOS, Android, and the Web ⚡️
https://capacitorjs.com
MIT License
11.24k stars 955 forks source link

[Feature]: native camera resolution, rotation and max size settings #7401

Closed Aarbel closed 1 month ago

Aarbel commented 1 month ago

Description

Natively include settings to

Platforms

Request or proposed solution

When some users use he capacitor camera, the browser sometimes crashes due to very high resolution (due to modern phones cameras). We are now handling the pictures compression / resize with javascript, but browser hardly manipulate pictures of 200Mo in a mobile webview, causing app crashes.

Alternatives

Javascript alternatives are not good, because mobile web browsers most of the time don't have enough RAM to handle this kind of pictures.

Additional Information

No response

jcesarmobile commented 1 month ago

closing as duplicate of https://github.com/ionic-team/capacitor-plugins/issues/2080

Would be better to copy all the information in that issue since the information there is empty and could be closed because of that.

BTW, the camera plugin has correctOrientation option to have non rotated pictures that works on Android and iOS. Also has width and height options for the pixel size, I guess you mean file size, would be good if you add that information to the ticket.

Aarbel commented 1 month ago

Thanks @jcesarmobile, modifications added on the ticket ✅

ionitron-bot[bot] commented 3 days ago

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Capacitor, please create a new issue and ensure the template is fully filled out.