The words Under construction in black text on a yellow background with diagonal black stipes surrounding it
I'm in the process of moving my site. It's still a work in progress. Please excuse the mess and broken links.

Convert An Image To base64 On The Command Line

TODO: Pull subtitle into page object

Use the `base64` command with the `< filename` operator to convert an image to base64 and save the string in a file:

code_start_default_section code_end_default_section

Debugging Stuff

I'm moving stuff around right now. All this below is helping me figure out where to put stuff

        -- title

Convert An Image To base64 On The Command Line

-- p

Use the `base64` command with the `> filename` operator to convert an image to base64 and save the string in a file:

-- code/
-- bash

base64 IMAGE_FILE.jpg > OUTPUT.txt

-- /code

-- p

You can also export it into an environmental variable for use in other scripts

-- code/
-- bash

export IMAGE_STRING=$(base64 IMAGE_FILE.jpg)
echo $IMAGE_STRING

-- /code


-- categories
-- Miscellaneous

-- metadata
-- date: 2021-10-07 21:16:39
-- id: 20eoxz7c
-- status: scratch
-- type: post
-- SCRUBBED_NEO: false
-- site: aws