Apparently you need the MD5 base64 encoded. Note that it's not the MD5 hex string, but the actual MD5 that needs to be encoded. I should have been using the following value:
openssl dgst -md5 -binary my_file.jpg | openssl enc -base64
TvJICC77MJ1Q8cu709fPSg==