How to quickly download Lorempixel images.
You can directly use URLs like this: http://lorempixel.com/400/300/nature/1/
but they will be downloaded every time from the Lorempixum server (they are not cached). For better performance or cache control you may want to save them locally. You can use cURL with its little known syntax for its input and -o
arguments to do it easily.
Save filenames like nature-400x300-5.jpg
:
curl 'http://{lorempixel}.com/{400}/{300}/{nature}/[1-10]/' -o '#4-#2x#3-#5.jpg'
Save filenames like lorempixel-nature-400x300-5.jpg
:
curl 'http://{lorempixel}.com/{400}/{300}/{nature}/[1-10]/' -o '#1-#4-#2x#3-#5.jpg'
Save filenames with original order of variables like lorempixel-400x300-nature-5.jpg
:
curl 'http://{lorempixel}.com/{400}/{300}/{nature}/[1-10]/' -o '#1-#2x#3-#4-#5.jpg'
Save filenames with only dashes like lorempixel-400-300-nature-5.jpg
:
curl 'http://{lorempixel}.com/{400}/{300}/{nature}/[1-10]/' -o '#1-#2-#3-#4-#5.jpg'
Save filenames with only resolution and number like 400x300-5.jpg
:
curl 'http://{lorempixel}.com/{400}/{300}/{nature}/[1-10]/' -o '#2x#3-#5.jpg'
Save filenames with just numbers like 5.jpg
:
curl 'http://{lorempixel}.com/{400}/{300}/{nature}/[1-10]/' -o '#5.jpg'