question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ImageManipulator "base64" option is enabled if you pass false

See original GitHub issue

Environment

expo: 25.0.0 react-native: https://github.com/expo/react-native/archive/sdk-25.0.0.tar.gz

Steps to Reproduce

Do this

import { ImagePicker, ImageManipulator } from 'expo'

const pickerResult = await ImagePicker.launchImageLibraryAsync({})

const uri = pickerResult.uri

const actions = []

actions.push({ resize: { width:50, height: 50 } })

const manipulatorResult = await ImageManipulator.manipulate(uri, actions, {
   base64: false, // FALSE!!!
})

console.log( manipulatorResult.base64 ) // base64 is in Manipulator result. BUG!!! 

Expected Behavior

When user pass false to “base64” option there should not be base64 in ImageManipulator result.

Actual Behavior

When I pass false to “base64” option I see base64 in ImageManipulator result.

Reproducible Demo

https://snack.expo.io/H1dREQOcM

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
gs-mtripathicommented, Oct 11, 2018

I am not getting base64 at all. sdkVersion 30. What am I missing?

1reaction
aalicescommented, Mar 28, 2018

Oops! Sorry for that, fixing! As a workaround, until new SDK is out, you can use undefined instead of false

Read more comments on GitHub >

github_iconTop Results From Across the Web

ImageManipulator - Expo Documentation
It is included if the base64 save option was truthy, and is a string containing the JPEG/PNG (depending on format ) data of...
Read more >
Sending base64 image uri to ImageManipulator - Stack Overflow
The API returns a full sized image, which I'm retrieving via XMLHttpRequest and then using FileReader to convert to base64. http.
Read more >
expo-image-crop-fixed - npm
ImageManipulator is only a API without a UI, so you have to build ... base64: string // undefined if base64 is false on...
Read more >
expo-image-manipulator-view - NPM Package Overview
Start using Socket to analyze expo-image-manipulator-view and its 4 ... base64: string | undefined, // undefined if base64 is false on ...
Read more >
How to use Camera from Custom Code in a Draftbit app
If you'd like to learn more about creating a new Draftbit app, ... if the base64 option is enabled, it will return the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found