@@ -13,7 +13,8 @@ function imageUrl(
1313 ?string $category = null, /* used as text on the image */
1414 bool $randomize = true,
1515 ?string $word = null,
16- bool $gray = false
16+ bool $gray = false,
17+ string $format = 'png'
1718): string;
1819```
1920
@@ -31,6 +32,10 @@ echo $faker->imageUrl(360, 360, 'animals', true, 'cats');
3132echo $faker->imageUrl(360, 360, 'animals', true, 'dogs', true);
3233
3334// https://via.placeholder.com/360x360.png/CCCCCC?text=animals+dogs+veniam
35+
36+ echo $faker->imageUrl(360, 360, 'animals', true, 'dogs', true, 'jpg');
37+
38+ // https://via.placeholder.com/360x360.jpg/CCCCCC?text=animals+dogs+veniam
3439```
3540
3641## ` image `
@@ -50,7 +55,8 @@ function image(
5055 bool $fullPath = true,
5156 bool $randomize = true,
5257 ?string $word = null,
53- bool $gray = false
58+ bool $gray = false,
59+ string $format = 'png'
5460)
5561```
5662
@@ -68,4 +74,8 @@ echo $faker->image(null, 360, 360, 'animals', true);
6874echo $faker->image(null, 360, 360, 'animals', true, true, 'cats', true);
6975
7076// '/tmp/9444227f06f0b024a14688ef3b31fe7a.png'
77+
78+ echo $faker->image(null, 360, 360, 'animals', true, true, 'cats', true, 'jpg');
79+
80+ // '/tmp/9444227f06f0b024a14688ef3b31fe7a.jpg'
7181```
0 commit comments