I’m attempting to determine how you can render a responsive picture programmatically inside a kind subject. I’m doing maintenance in a code on my present job, and typically there are kind fields utilizing Drupal Development Company ‘#markup’ property. Now I want to alter all photographs to be responsive.
Drupal Development code instance:
$kind['markup1'] = [ '#markup' => '<div class="rating_reminder"><img src="'.file_create_url($order->campaign_id->entity->product_id->entity->image->entity->getFileUri()).'"><div>' ];
It is extremely laborious to search out something explaining how you can use responsive photographs which might be in code in PHP.
I will be very grateful should you may help me.