REST Export Views and images alternative text I have a simple REST export View. The View format is set to "Show: Entity". 

The content type I am exporting contains a standard image field. My image field settings is set to "Enable Alt field" and "Alt field is required".

Therefore all my nodes that have an image, have an image alternate text (Alt).

In the JSON that my view outputs, there is nowhere that I can find the value of the image alternate text.

For each image, I get the filesize, the filename, the filemime, the uri, etc. etc. but no alt text.

Any idea why? And how could I retrieve it? (other than by replacing the image alt text by a separate field...)
Views Format: Fields

I don't think there is a special separate field in Views UI for the Alt field. Alt text is part of the Image field data, stored with the content entity (not the file). 

So what you do is add another Image field to your Views, but configure it this way: 


Rewrite results
Override the output of this field with custom text
Check Replacement patterns below to find your Alt token
Enter the replacement pattern into the above Text field {{ field_image__alt }}


Now you have the image Alt text showing as the field output instead of the actual image. 



Edit: The above can only help if you're using Fields under your Format settings in Views. 

Views Format: Content/Entity

When showing full entities in Views you need to use Content Type/Entity View modes (not to be confused with anything Views related). On your CT add a new View mode on the Manage display page, or adjust the existing one you're using in your Views Format settings. 

Custom Image field formatter

This is where you should be able to adjust your Image field Formatter, but unfortunately the Image field doesn't seem to come with the "Alt" text formatter. 

Other than creating the custom Formatter yourself you can check out this Issues and module: 


Add 'alt' and 'title' tokenized text options for image formatters, and a 'title' option for the generic file formatter
Custom Formatters