Code development platform for open source projects from the European Union institutions 🔵 EU Login authentication by SMS has been phased out. To see alternatives please check here

Skip to content

Proposal: Use twig filter extension for Image value object

Created by: msnassar

Backgroup: Currently, in order to pass ImageValueObject to a pattern, you are doing preprocess to prepare the image e.g. here. I think, this is very complex and requires to do preprocess for each entity type and each image field!

Solution: To avoid all these preprocesses, I suggest to create a twig extension that converts a render array that contains ImageItem to ImageValueObject.

Example from UCPKN: Find the extension here Find usages example here

Please let me know your thoughts?