Skip to content

Conversation

ajacquierbret
Copy link

@ajacquierbret ajacquierbret commented Oct 2, 2025

Summary

When calling Compressor.compress() with a base64 input on iOS, the ImageCompressor module handles it as a URL, and therefore prepends file:/// to it before initializing a Swift Data object, which causes the compression process to fail.

This PR modifies the ImageCompressor class to call getAbsoluteImagePath only if the compressor's input option is set to anything other than base64. If the input is base64, it will be handled by automatic/manual handlers as-is and will be properly mapped to ImageUI.

The rest of the compression process that was expecting the input to always be a URL has been modified to handle the input polymorphism.

Changelog

  • No user-facing changes to the public API.
  • Image compression now handles base64 input for both automatic and manual compression methods.

Issues

Fixes #299

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

InputType = 'base64' is failed
1 participant