YJS is probably not the right tool to sync binary data. The benefit of YJS (which comes at significant cost in memory and bandwidth), is the conflict-free merges (i.e. the CRDT part). These are only possible with the existing shared types.
Technically you could base64 encode an image and store it in a simple Y.Array or Y.Map but I’m not sure that’s a good idea. All clients would have to store and sync every version of the image that ever existed.
I would consider storing the images in a separate location (such as on S3) and then use YJS to share hashes/urls.