@@ -13,7 +13,8 @@ function imageUrl(
13
13
?string $category = null, /* used as text on the image */
14
14
bool $randomize = true,
15
15
?string $word = null,
16
- bool $gray = false
16
+ bool $gray = false,
17
+ string $format = 'png'
17
18
): string;
18
19
```
19
20
@@ -31,6 +32,10 @@ echo $faker->imageUrl(360, 360, 'animals', true, 'cats');
31
32
echo $faker->imageUrl(360, 360, 'animals', true, 'dogs', true);
32
33
33
34
// 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
34
39
```
35
40
36
41
## ` image `
@@ -50,7 +55,8 @@ function image(
50
55
bool $fullPath = true,
51
56
bool $randomize = true,
52
57
?string $word = null,
53
- bool $gray = false
58
+ bool $gray = false,
59
+ string $format = 'png'
54
60
)
55
61
```
56
62
@@ -68,4 +74,8 @@ echo $faker->image(null, 360, 360, 'animals', true);
68
74
echo $faker->image(null, 360, 360, 'animals', true, true, 'cats', true);
69
75
70
76
// '/tmp/9444227f06f0b024a14688ef3b31fe7a.png'
77
+
78
+ echo $faker->image(null, 360, 360, 'animals', true, true, 'cats', true, 'jpg');
79
+
80
+ // '/tmp/9444227f06f0b024a14688ef3b31fe7a.jpg'
71
81
```
0 commit comments