The RemoteImageFormatter uses the title instead of the alt field when rendering the remote image.

   public function viewElements(FieldItemListInterface $items, $langcode) {
     $elements = [];
 
     // Add one image per item.
     foreach ($items as $delta => $item) {
       ...
       // Set the alt field.
       if ($this->fieldDefinition->getSetting('alt_field') === 1) {
         $elements[$delta]['#alt'] = $item->title;
       }
     }
 
     return $elements;
   }

Comments

tucho created an issue. See original summary.

tucho’s picture

Status: Active » Needs review
StatusFileSize
new578 bytes

I uploaded a trivial patch that fix this issue.

gaurav.kapoor’s picture

Status: Needs review » Reviewed & tested by the community

Good Catch!. Thanks for working on this.

  • gaurav.kapoor committed 93118aa on 8.x-1.x authored by tucho
    Issue #2987328 by tucho, gaurav.kapoor: RemoteImageFormatter uses title...
gaurav.kapoor’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.