Image Upload Basics
Uploading an image from an LWC using features supported offline is a two-step process.
First, use createContentDocumentAndVersion to upload the
image file. This adapter creates ContentDocument and ContentVersion records for the file upload. After the ContentDocument and ContentVersion exist, use createRecord to
create the ContentDocumentLink record that relates the image
upload to the record you want to attach it to.