Python
# This fiddle converts the content of a file to an "escaped" string
# Step 1 - Click on the "Upload files" icon and select your file
# Step 2 - Adjust the name of your file in the below line
my_filename = "something.jpg"
# Step 3 - Click on the green ▶ button to run this script
# Step 4 - Copy for your need the escaped string from the script output
file = open(my_filename, "rb")
content = file.read()
file.close()
# Print the escaped content in the console
print(content)
b"\xff\xd8\xff\xe0\x00\x10JFIF\x00\x01\x01\x01\x00\x0e\x00\x0e\x00\x00\xff\xdb\x00C\x00\x06\x04\x05\x06\x05\x04\x06\x06\x05\x06\x07\x07\x06\x08\n\x10\n\n\t\t\n\x14\x0e\x0f\x0c\x10\x17\x14\x18\x18\x17\x14\x16\x16\x1a\x1d%\x1f\x1a\x1b#\x1c\x16\x16 , #&')*)\x19\x1f-0-(0%()(\xff\xdb\x00C\x01\x07\x07\x07\n\x08\n\x13\n\n\x13(\x1a\x16\x1a((((((((((((((((((((((((((((((((((((((((((((((((((\xff\xc0\x00\x11\x08\x00 \x00 \x03\x01\x11\x00\x02\x11\x01\x03\x11\x01\xff\xc4\x00\x18\x00\x00\x03\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x08\x02\x07\xff\xc4\x00\x1c\x10\x01\x00\x02\x02\x03\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x022q\x03\x1113\xff\xc4\x00\x1b\x01\x00\x01\x05\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x07\x01\x02\x03\x04\x08\x00\x06\xff\xc4\x00(\x11\x00\x02\x01\x02\x04\x05\x04\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x02\x03\x041Qq\x91\x12\x143S\xb1\x11\x13#A!24\xff\xda\x00\x0c\x03\x01\x00\x02\x11\x03\x11\x00?\x00\xe7O\x1ci\x10\x8fa\xc4u\xbar\xd1\x967\x1f\xce\xba\x80\x8a\xafRZ\xb0\x17,Y\xa4b\x11\xbfC\x08q\xe7-\xfb\x91\xdd\x0e=\x82\x11\xd6\xbc\xb7\xf6\xe5\xf2,\x1f\xda,Za]\x05ul\xee\x1c\xdbT\xe5\x8eL\tJK\xd5\xfeM\x19\xc9\\v\xe5\xb3\x13\x89fq\x97\xaa\xe2y\x99\xdb\x9c\xb8\xee=\xd8,Z\xc9\xba\xf0\xd5y\x1fN\xee\xbf\x1a\xf9\x1e\xec\x97\xef\x9d\xb6\xda\xf6\x96v\xee\x84\x1b\xa7\x1c\x17\xd2\xc8,)?LD\xb1\xc9[\xf6\xe3\xb2;\x89\xe6T,.\x07\x01b\xd3\xaf\rW\x91\xf4\xff\x00u\xa9/\xdf;m\xb8l\xff\x00\x9e\x9e\x8b\xc0^X\t`S\xff\xd9"