How to use base64 encoded image as an argument?

I am trying to use the base64 encoding of an image as a flag when I run my program. Im getting back: Argument list too long

I am on a Ubuntu 16.04 Docker image on a mac.

$ ./myProgram -input "/9j/4AAQSkZJRgABA [...]"

Source: StackOverflow