diff --git a/uw_cfg_common.module b/uw_cfg_common.module
index 8586bd9dee0a30654839bd41014c2a4dc0258d7b..e4aec4989d00fa92bd73772232d727552419b39d 100644
--- a/uw_cfg_common.module
+++ b/uw_cfg_common.module
@@ -1163,9 +1163,25 @@ function _uw_cfg_common_banner_validate(array &$form, FormStateInterface $form_s
  * Implements hook_field_widget_WIDGET_TYPE_form_alter().
  */
 function uw_cfg_common_field_widget_entity_reference_paragraphs_form_alter(&$element, &$form_state, $context) {
+
+  // If this is a banner image, add the required manually.
   if ($element['#paragraph_type'] == 'uw_para_image_banner') {
+
+    // If this is not a block, add the class for required
+    // on the image, we need to do this so that when using
+    // banners with media, the required does not work properly
+    // when banners are not selected.
+    // If it is a block, just add the required to the element.
     if (!isset($context['form']['#block'])) {
-      $element['subform']['field_uw_ban_image']['widget']['#attributes']['class'] = 'form-required js-form-required';
+
+      // If there already is classes set, then add to the array.
+      // If no classes yet, add as an array.
+      if (isset( $element['subform']['field_uw_ban_image']['widget']['#attributes']['class'])) {
+        $element['subform']['field_uw_ban_image']['widget']['#attributes']['class'][] = 'form-required';
+      }
+      else {
+        $element['subform']['field_uw_ban_image']['widget']['#attributes']['class'] = ['form-required'];
+      }
     }
     else {
       $element['subform']['field_uw_ban_image']['widget']['#required'] = TRUE;