Proper way to create image field in a content entity
See ...

$entity-&gt;getFieldDefinition('image')

'file_extensions' =&gt; string(16) "png gif jpg jpeg"
'file_directory' =&gt; string(31) "[date:custom:Y]-[date:custom:m]"


And edit

$fields['image'] = BaseFieldDefinition::create('image')
  -&gt;setLabel(t('Image'))
  -&gt;setDescription(t('Image field'))
  -&gt;setSettings([
    'file_directory' =&gt; 'IMAGE_FOLDER',
    'alt_field_required' =&gt; FALSE,
    'file_extensions' =&gt; 'png jpg jpeg',
  ])
 -&gt;setDisplayOptions('view', array(
    'label' =&gt; 'hidden',
    'type' =&gt; 'default',
    'weight' =&gt; 0,
  ))
  -&gt;setDisplayOptions('form', array(
    'label' =&gt; 'hidden',
    'type' =&gt; 'image_image',
    'weight' =&gt; 0,
  ))
  -&gt;setDisplayConfigurable('form', TRUE)
  -&gt;setDisplayConfigurable('view', TRUE);