diff --git a/src/Service/UWService.php b/src/Service/UWService.php index c3d7b33936331b86dac2a4a25608abf105eb21ac..f986c8538b24633410a8af76eaea32f0069d2b1e 100644 --- a/src/Service/UWService.php +++ b/src/Service/UWService.php @@ -78,6 +78,9 @@ class UWService implements UWServiceInterface { $variables['uri'] = $file->getFileUri(); $variables['responsive_image_style_id'] = $image_style; + // Set the alt for the image. + $variables['alt'] = $entity->field_media_image->alt; + // These is a function from the responsive image module that sets all // the variables for the sources of the responsive image. template_preprocess_responsive_image($variables);