fzaninotto / Faker

Faker is a PHP library that generates fake data for you
MIT License
26.78k stars 3.58k forks source link

imageUrl()/image() used with lorempixel generating wrong image url with $randomie = false param #1784

Open amackiewicz opened 5 years ago

amackiewicz commented 5 years ago

Currently, call imageUrl() method with 4th param (randomize) set to false generate url as below: https://lorempixel.com/196/196/people/?36161 "Randomize" function working wrong. According to current info on https://lorempixel.com/ for get static image number should be in range 1-10 and need to be placed in url.

call example:

$this->faker->imageUrl(196, 196, 'people', false);

current result:

https://lorempixel.com/196/196/people/

desired return:

https://lorempixel.com/196/196/people/[1-10]

ex:

https://lorempixel.com/196/196/people/8

In addition, static number in url should be places before word param value.

amackiewicz commented 5 years ago

Fixing PR: https://github.com/fzaninotto/Faker/pull/1785