Hot answers tagged


I solved the problem by adding a media image field on the remote video media entity and then altering the media entity on presave, like this: /** * Implements hook_entity_presave(). */ function MY_MODULE_entity_presave(Drupal\Core\Entity\EntityInterface $entity) { if ($entity->getEntityTypeId() == 'media' && isset($entity->custom_thumbnail-...


To print a responsive image style: {% set responsiveimagestyle = { '#theme': 'responsive_image', '#responsive_image_style_id': 'responsive_image_style', '#uri': node.field_slides[key].entity.uri.value, '#attributes': { class: 'swiper-image', alt: 'text', title: 'text' }, } %} {{ responsiveimagestyle }}

Only top voted, non community-wiki answers of a minimum length are eligible