diff --git a/src/ImageExtension.php b/src/ImageExtension.php index 648a39d..361267e 100644 --- a/src/ImageExtension.php +++ b/src/ImageExtension.php @@ -260,6 +260,7 @@ private function createImage( if ($srcset) { $sources[] = [ 'srcset' => $srcset, + 'sizes' => $attributes['sizes'] ?? null, 'type' => $type, ]; } diff --git a/tests/Unit/ImageExtensionTest.php b/tests/Unit/ImageExtensionTest.php index 05c7955..3bebc9c 100644 --- a/tests/Unit/ImageExtensionTest.php +++ b/tests/Unit/ImageExtensionTest.php @@ -169,6 +169,7 @@ public function testComplexWebpPictureTag(): void $this->assertSame( '' . '' . '