https://gist.github.com/jjaimealeman/23b4948fd3ad029bf28bb04f5d630af0
During the development of a static website, I often need to use an image from Unsplash.
It's time-consuming to browse the site and search for something, and then download, resize and move into my working folder. I found this
npm
package https://github.com/MehediH/Bulksplash but it didn't work as I was hoping.In my research I found this site https://picsum.photos/ that provides direct downloads from Unsplash with a set width and height. and It gave me an idea!
So I decided to write my own :)
This simple script gives options for width and height, from 100px to 900px, and the final option is for fullsize of 1980x1080.
I came up with two scripts:
./funsplash
- gives user a list of size options ranging from 100 to 900.
./funsplash2
- allow user to send two arguments inline. Ex:./funsplash2 500 300
will download an image with dimensions of 500x300
- Make script to run inline with arguments for dimensions.
- Provide additional option to download multiple images.
- Make a JavaScript version? 🤔
- Make a VS Code extension? 🤔