Assign file to entity image field (Programmatically) //class:Drupal\file\Entity\File
$file=file_save_data($image_data,$save_path,FILE_EXISTS_REPLACE);

//field_someimage = entity 'image' field
//field class:FileFieldItemList
//It contains objects with class FieldType\ImageItem
$field_someimage=$entity-&gt;get('field_someimage');


How can i add $file to the field_someimage of $entity? (entity already exists). 
Do i need to construct new ImageItem somehow?
You add an image to the field by assigning the file id to target_id:

$entity-&gt;field_someimage[] = [
  'target_id' =&gt; $file-&gt;id(),
  'alt' =&gt; 'Alt text',
  'title' =&gt; 'Title',
];
$entity-save();


You can add other properties at the same time. An image usually needs a title and an alt text.