It would be nice to have token replacement for image fields in views.

Comments

13rac1’s picture

Status: Active » Postponed (maintainer needs more info)

I don't know if I understand this feature request. Can you describe in more detail what you'd like?

Lukas von Blarer’s picture

Hm... This was a while ago, but if I recall it correctly, I wanted to specify alt and title attributes in views on a image field using tokens.

srobert72’s picture

Same request, I would like to specify ALT and TITLE attributes in Views using tokens and replacements available with view fields.

13rac1’s picture

Can you explain how this would work (in the UI, not in the code)? I don't know if I understand this request. Step-by-step please.

Lukas von Blarer’s picture

When adding an image field in views, I would like to be able to specify these attributes in the field config. There would be two text fields to do that where one could input static text and use token replacements from the current row.

As a workaround one could just render the file entity where this is already possible. So now I see that this is not a very urgent thing...

srobert72’s picture

I have Photo content nodes with ImageField.
A Photo node is linked to others Content nodes by EntityReference fields.

I have Views to select and display Image contained in Photos nodes.
I can write ALT and TITLE from ImageField but that is not what I want.

For me ALT and TITLE depend on nodes linked by EntityReference.
So I select EntityReference fields in my views. So I have available tokens in view row with EntityReference fields.

I'd like to use values from these tokens to write ALT and TITLE attributes.

Jose Reyero’s picture

Issue summary: View changes

Interested in this feature too, in addition to #1934986: Alternate approach: replace tokens on the fly. We need some proper field formatter for it to be used on views.