How to transfer Editable Image from Client > Server

I am using Early Preview: Alpha Release of Photo-to-Avatar APIs, and the 2D Preview is an Editable Image that can only be made on the Client, so I’ll have to transfer it over using a RemoteEvent.

I am using EditableImage:ReadPixelsBuffer(Vector2.zero, EditableImage.Size) to get the Pixel Info, and sending this over the RemoteEvent.

RemoteEvent.OnServerEvent:Connect(function(Player: Player, PreviewImage)

	local options = { Size = Vector2.new(Sign.SignPart.SurfaceGui.Picture.Size.X.Offset, Sign.SignPart.SurfaceGui.Picture.Size.Y.Offset) }
	local editableImage = AssetService:CreateEditableImage(options)

	local pixelsBuffer = buffer.create(Sign.SignPart.SurfaceGui.Picture.Size.X.Offset * Sign.SignPart.SurfaceGui.Picture.Size.Y.Offset * 4)

	for i = 1, editableImage.Size.X * editableImage.Size.Y do
		
		local pixelIndex = (i - 1) * 4
		
		buffer.writeu8(pixelsBuffer, pixelIndex, buffer.readu8(PreviewImage, pixelIndex))
		buffer.writeu8(pixelsBuffer, pixelIndex + 1, buffer.readu8(PreviewImage, pixelIndex + 1))
		buffer.writeu8(pixelsBuffer, pixelIndex + 2, buffer.readu8(PreviewImage, pixelIndex + 2))
		
		buffer.writeu8(pixelsBuffer, pixelIndex + 3, 255)
	end

	editableImage:WritePixelsBuffer(Vector2.zero, editableImage.Size, pixelsBuffer)

	Picture.ImageContent = Content.fromObject(editableImage)
end)

However this just creates a pink/blue image, when it should be matching what’s on the right:

Is it just not possible to send Editable Images over? Not sure what to do

EditableImages do not replicate rn.
Generate them on a client instead.
Send buffer from server side and let client generate it.

This isn’t possible since the 2D Previews (The Photo-to-Avatar Image on the right) are only generatable Client Side, so I need to find a way to send over the pixel data to the Server. Is that not possible then?

You can write it into a buffer and send it to server and then from server send it to other clients and generate.
Do validate buffer size or else you may make possible exploit to crash the game.

Ok how would I do that? I put the function I tried using there, but it only generates a pink and blue image so I think the function I used is written wrong but I’m not sure what

In the provided code you do generate image on server.
EditableImage does not replicate to clients by itself.

You have to generate it on a client.

Ok I changed the function in my initial message to use PreviewImage that’s sent over, and I now send this to all other clients and generate the Editable Image there, however now instead of a pink/blue image, it is just a white image.