In my code.ts
I have a JPEG image that’s been converted to base64 and I am attempting to use it as the imageHash
value but am getting Invalid SHA1 hash
error.
const img = '/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAA...
const rect = figma.createRectangle();
rect.fills = [{ type: 'IMAGE', scaleMode: 'FIT', imageHash: img }];
figma.currentPage.appendChild(rect);
What conversion needs to happen to the base64 string in order to use it this way?