commit 0629bfa5bf9daa33eb8f270246d54b3caab03fdd Author: Andros Fenollosa Date: Sun Dec 1 10:46:57 2024 +0100 Add diff --git a/README.md b/README.md new file mode 100644 index 0000000..3e29f7f --- /dev/null +++ b/README.md @@ -0,0 +1,34 @@ +# Place image: Random images for work on web development or design. + +![website](demo2.jpg) + +## [Download now](https://github.com/tanrax/place-image/releases/download/master/pack-place-images.zip) +(Daily new images) + + +## [Website](https://place-image.andros.dev/) +(Daily new images) + +- 10 random images with random sizes +- 10 people images with 200x200 +- 10 square images with 800x800 +- 10 rectangle images with 800x400 + +## Generate your customs images + +### Require + +- webp: `apt install webp` +- fish: `apt install fish` + +### Download + +``` bash +curl -L https://raw.githubusercontent.com/tanrax/place-image/master/place-images.fish -o place-images.fish +``` + +### Run + +``` bash +fish place-images.fish +``` diff --git a/demo.jpg b/demo.jpg new file mode 100644 index 0000000..2b58b56 Binary files /dev/null and b/demo.jpg differ diff --git a/demo2.jpg b/demo2.jpg new file mode 100644 index 0000000..d333dfa Binary files /dev/null and b/demo2.jpg differ diff --git a/place-images.fish b/place-images.fish new file mode 100755 index 0000000..38629b6 --- /dev/null +++ b/place-images.fish @@ -0,0 +1,56 @@ +#!/bin/fish + +# Variables +set SOURCE_DOWNLOAD_IMAGES "https://source.unsplash.com/random/" +set PATH_TEMP "places-images" +set FILENAME_OUTPUT "pack-place-images.zip" + +# Remove old images +rm -rf $PATH_TEMP $FILENAME_OUTPUT + +# Make folder +mkdir -p $PATH_TEMP/jpg $PATH_TEMP/webp $PATH_TEMP/avif + +# Download random images +for i in (seq 1 10) + set FILENAME_IMAGE image-random-$i + curl -L "{$SOURCE_DOWNLOAD_IMAGES}?sig=$i" -o $PATH_TEMP/jpg/$FILENAME_IMAGE.jpg + # Transform jpg to webp + cwebp $PATH_TEMP/jpg/$FILENAME_IMAGE.jpg -o $PATH_TEMP/webp/$FILENAME_IMAGE.webp + # Transform jpg to avif + avifenc $PATH_TEMP/jpg/$FILENAME_IMAGE.jpg -o $PATH_TEMP/avif/$FILENAME_IMAGE.avif +end + +# Download square images 800x800 +for j in (seq 1 10) + set FILENAME_IMAGE image-square-$j + curl -L "{$SOURCE_DOWNLOAD_IMAGES}800x800/?sig=$j" -o $PATH_TEMP/jpg/$FILENAME_IMAGE.jpg + # Transform jpg to webp + cwebp $PATH_TEMP/jpg/$FILENAME_IMAGE.jpg -o $PATH_TEMP/webp/$FILENAME_IMAGE.webp + # Transform jpg to avif + avifenc $PATH_TEMP/jpg/$FILENAME_IMAGE.jpg -o $PATH_TEMP/avif/$FILENAME_IMAGE.avif +end + +# Download rectangle images 800x400 +for k in (seq 1 10) + set FILENAME_IMAGE image-rect-$k + curl -L "{$SOURCE_DOWNLOAD_IMAGES}800x400/?sig=$k" -o $PATH_TEMP/jpg/$FILENAME_IMAGE.jpg + # Transform jpg to webp + cwebp $PATH_TEMP/jpg/$FILENAME_IMAGE.jpg -o $PATH_TEMP/webp/$FILENAME_IMAGE.webp + # Transform jpg to avif + avifenc $PATH_TEMP/jpg/$FILENAME_IMAGE.jpg -o $PATH_TEMP/avif/$FILENAME_IMAGE.avif +end + +# Download people images 200x200 +for l in (seq 1 10) + set FILENAME_IMAGE image-people-$l + curl -L "{$SOURCE_DOWNLOAD_IMAGES}200x200/?people\&sig=$l" -o $PATH_TEMP/jpg/$FILENAME_IMAGE.jpg + # Transform jpg to webp + cwebp $PATH_TEMP/jpg/$FILENAME_IMAGE.jpg -o $PATH_TEMP/webp/$FILENAME_IMAGE.webp + # Transform jpg to avif + avifenc $PATH_TEMP/jpg/$FILENAME_IMAGE.jpg -o $PATH_TEMP/avif/$FILENAME_IMAGE.avif +end + +# Zip images +zip -r $FILENAME_OUTPUT $PATH_TEMP +rm -rf $PATH_TEMP