first you upload the image to IPFS, you keep the link for the image, then you create a json file/object that contains that image link
you can upload from cloud code an image too, you already know how to do it in front end
you can also upload a json from front end, you’ll have to convert it to a string, you’ll find examples with btoa in other similar forum posts