I am creating a custom Drupal 8 theme, and I want to change the image style of the indexed article content of the frontpage - only the article content type.
To do that properly - avoiding using CSS hack - I have to *change the image style the image field of the display mode Teaser of the article content type**, the display mode "teaser" is used by the native view "frontpage" to index content. And I have to do that modification at the theme installation and thus configure the theme properly to do that modification at installation. It's not working with conf file because the configuration already exist. i am asking here advice on how to do that.
In details: I need to change the image style of the field "field_image" of the mode display "teaser" of the content type "article".
By default it use the image style "large" and I want it to use a new image style "hp_wide" that the theme import - successfully - at theme installation.
From my research, I've found that I've to create a PHP function in MyThEme.theme with
\Drupal::configFactory()->getEditable($name), it is the correct way? If yes how can I target that specific field settings, how can I know the "path" of that settings?