public function srcset($images, $descriptor = 'w') { $r = ''; foreach ($images as $image) { $r .= $image->getUrl() . ' ' . $image->getWidth() . 'w, '; } return substr($r, 0, strlen($r) - 2); }