Feature : Add an image faker
Hello, What about adding an image faker? We could use this kind of API : http://lorempixel.com/
Let me know if your interested and i will contribute.
It will be great to have image faker, but I am not sure is it a good idea to couple with specific image provider. Can you share more about the details? i.e. the faker config and output
The idea behind the image faker is to provide image URLs in order to display them on a website for example or get them through an API call. Lorempixel is one of fake image providers that offer a way to configure placeholder images.
We can imagine something like that :
let image_url: String = Image(400, 200).fake()
println!("Image url : {}", image_url"); // http://lorempixel.com/400/200/
A PHP library uses lorempixel, you can see the different use cases here : https://github.com/fzaninotto/Faker#fakerproviderimage
Indeed if the image provider stop working one day it will be an issue.
If the api is specific to lorempixel, I think the config object can be Lorempixel under image category?
i.e. let image_url: String = Lorempixel(400, 200).fake(), so that we can also implement other image provider when needed.
Ok! I will try something like that 👍