Webform image select element is dispalying another image while used in webform handler In drupal 8,

I have created a custom webform handler to create a new article node and copy the data and images from the webform element
to the created article node.

In both artcle node and contact webform, i have created the required fields/elements.

Article node fields:



Contact webform element:



Now, after submitting the contact webform:



everything goes as expected and a new Article node is created with all fields filled in with data/images.

However, only the Webform element image select is displaying another image instead of the one selected
while submitting the webform.

Below is the created article:



As you can see, the webform element image has been properly populated  but the problem is within the webform element image select !!!

I am sure that my custom code is fine as all other fields are populated correctly.

Any idea/help why the picture is being replaced by another one ??!!

Below is my custom handler code:

&lt;?php

namespace Drupal\my_module_name\Plugin\WebformHandler;

use Drupal\Core\Session\AccountInterface;
use Drupal\Core\Serialization\Yaml;
use Drupal\Core\Form\FormStateInterface;

use Drupal\node\Entity\Node;

use Drupal\webform\WebformInterface;
use Drupal\webform\Plugin\WebformHandlerBase;
use Drupal\webform\webformSubmissionInterface;
use Drupal\webform\Entity\WebformSubmission;


/**
 * Create a new node entity from a webform submission.
 *
 * @WebformHandler(
 *   id = "Create a node",
 *   label = @Translation("Create a node"),
 *   category = @Translation("Entity Creation"),
 *   description = @Translation("Creates a new node from Webform Submissions."),
 *   cardinality = \Drupal\webform\Plugin\WebformHandlerInterface::CARDINALITY_UNLIMITED,
 *   results = \Drupal\webform\Plugin\WebformHandlerInterface::RESULTS_PROCESSED,
 *   submission = \Drupal\webform\Plugin\WebformHandlerInterface::SUBMISSION_REQUIRED,
 * )
 */

class ExampleWebformHandler extends WebformHandlerBase {

  /**
   * {@inheritdoc}
   */

  // Create node object from webform-submission.

  // Function to be fired while submitting the Webform.
  public function submitForm(array &amp;$form, FormStateInterface $form_state, WebformSubmissionInterface $webform_submission) {
    // Get an array of the values from the submission.
    $values = $webform_submission-&gt;getData();

    // Before you actually save the node, make sure you get what you
    // want. So at first comment the line further down with 
    // $node-&gt;save(), run the debug code, check the output and then
    // uncomment the $node-&gt;save() and delete the debug foreach loop.
    // You can use whatever debug method you prefer, this is just a
    // simple one-time example.
     foreach($values as $key=&gt;$value) {
       drupal_set_message($key . ' -&gt; ' . $value);
     }

    // This is the node creating/saving part.
      $node = Node::create([
     'type'        =&gt; 'article',
    // Use this format: 'node_machine_name_field' =&gt; $values('webform_machine_name_field') for below fields.
      'title' =&gt; $values['subject'],
      'body' =&gt; $values['message'],
      'field_image' =&gt; $values['picture'],
      'field_picture_select' =&gt; $values['picture_select'],
    // etc...
     ]);

    // Before you un-comment this line, make sure you get all the 
    // values you need from the webform data (in the foreach loop).
    $node-&gt;save();
  }
}
Finally, I am decided to go with "Business rules" module which will allow to create any content type and transfer all data from webform submission to the created node by setting up a few actions to be triggered on the rule event: entity insert of type webform submission.

See video tutorials here: https://www.youtube.com/channel/UC3jgO5Yt-5y__VVT74qRgSg