L
L
lukoie2019-01-30 11:41:19
Images
lukoie, 2019-01-30 11:41:19

Which placeholder site can randomize pictures?

Guys, how to make one page have different placeholder pictures?
like you insert a picture of the format
https://source.unsplash.com/300x200
lorempixel.com/300/200
loremflicker.com/300/200
placekitten.com/300/200
into the layout of the news page, but it does not give the same picture , but everyone is different

kinda not like this
5c516324ca8c8947942502.png

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexey Ukolov, 2019-01-30
@alexey-m-ukolov

lorempixel.com can serve 10 different images from the same category:

http://lorempixel.com/400/200/sports/1
http://lorempixel.com/400/200/sports/2
...
http://lorempixel.com/400/200/sports/10

There are 13 different categories - a total of 130 pictures are obtained.

L
lukoie, 2019-01-30
@lukoie

In short, I made it so that different pictures in the layout were shown on the same link
in my case, the picture is displayed ten to twenty times like this:
Recipe - I attach the "nocache" class to the pictures
and in the basement

$(document).ready(function (){$('.nocache').attr('src',function () { return $(this).attr('src') + "?" + Math.random() });});

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question