Display a random image with vibe.d

pilger abcd at dcba.com
Sun Jun 20 12:59:51 UTC 2021


On Sunday, 20 June 2021 at 12:34:33 UTC, vnr wrote:
> I don't understand why the image doesn't display, when I take 
> an image from the internet and give the url, it works fine 
> though.

maybe this works:
const auto rndimg = format("/images/rndimg/img%d.jpg", a);

> Also, is this a good way to randomly display an image or is 
> there a way that is maybe cleaner/efficient?

i would use the a/b testing capabilities of the webserver.



More information about the Digitalmars-d-learn mailing list