Active
Project:
Image Alt Fallback
Version:
1.1.2
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
7 Jul 2026 at 08:03 UTC
Updated:
7 Jul 2026 at 08:03 UTC
Jump to comment: Most recent
Currently, we do not have a strategy to provide a fallback alt for some entity types like paragraphs. That is because there are entities without a valid label, like paragraphs.
For entities that support getting the parent entity, add a behavior to get parent entity label.
For example, for paragraphs it can be used the getParentEntity . For this specific use case, we need a bucle so we get a parent entity which is indeed supported. Example:
while ($parent instanceof ContentEntityInterface && $parent->getEntityTypeId() === 'paragraph') {
$parent = $parent->getParentEntity();
}
Comments