Convert online image to base64

Is there a way to convert a list of online images to base64 code via Easymorph?

Hello Arend,

in a past project, I also required to convert image files (in this case .jpg’s) to base64. I used the following setup:

  • the main step is a ‘Run program’ action running a piece of CMD code that requires two EasyMorph parameters and goes as follows:

    certutil -encode {parameter_with_path_to_input_jpg} tmp.b64 && findstr /v /c:- tmp.b64 > {parameter_with_path_to_output_b64}

  • as this generates a temporary ‘tmp.b64’ file, a subsequent ‘File command’ action deletes the temporary file.

Both actions are held inside a module that is called from a parent module, which lists all images to convert and calls the base-64-encoding submodule for each image. I imagine in your case, you would need to download the online images (I’m curious what exactly you mean by that?) first.

1 Like