diff --git a/scripts/generate-blurred-images.sh b/scripts/generate-blurred-images.sh new file mode 100755 index 0000000..f6d8896 --- /dev/null +++ b/scripts/generate-blurred-images.sh @@ -0,0 +1,8 @@ +find "./static/imgs/ricing_competitions/" -type f \ + \( -iname "*.jpg" -o -iname "*.png" -o -iname "*.gif" -o -iname "*.bmp" -o -iname "*.jpeg" \) -print0 | +while IFS= read -r -d '' filepath; do + directory=$(dirname "$filepath") + filename=$(basename "$filepath") + generated_filename="${directory}/generated_${filename}" + magick convert -scale 10% -gaussian-blur 0x1 -modulate 100,300,100 -resize 1000% "$filepath" "$generated_filename" +done diff --git a/static/imgs/ricingcomp1/amadeus.png b/static/imgs/ricing_competitions/1/amadeus.png similarity index 100% rename from static/imgs/ricingcomp1/amadeus.png rename to static/imgs/ricing_competitions/1/amadeus.png diff --git a/static/imgs/ricingcomp1/flafy.png b/static/imgs/ricing_competitions/1/flafy.png similarity index 100% rename from static/imgs/ricingcomp1/flafy.png rename to static/imgs/ricing_competitions/1/flafy.png diff --git a/static/imgs/ricingcomp1/flicko.png b/static/imgs/ricing_competitions/1/flicko.png similarity index 100% rename from static/imgs/ricingcomp1/flicko.png rename to static/imgs/ricing_competitions/1/flicko.png diff --git a/static/imgs/ricingcomp1/lauroro.jpg b/static/imgs/ricing_competitions/1/lauroro.jpg similarity index 100% rename from static/imgs/ricingcomp1/lauroro.jpg rename to static/imgs/ricing_competitions/1/lauroro.jpg diff --git a/static/imgs/ricingcomp1/lyasm.png b/static/imgs/ricing_competitions/1/lyasm.png similarity index 100% rename from static/imgs/ricingcomp1/lyasm.png rename to static/imgs/ricing_competitions/1/lyasm.png diff --git a/static/imgs/ricingcomp2/day-night.png b/static/imgs/ricing_competitions/2/day-night.png similarity index 100% rename from static/imgs/ricingcomp2/day-night.png rename to static/imgs/ricing_competitions/2/day-night.png diff --git a/static/imgs/ricingcomp2/end_4.jpg b/static/imgs/ricing_competitions/2/end_4.jpg similarity index 100% rename from static/imgs/ricingcomp2/end_4.jpg rename to static/imgs/ricing_competitions/2/end_4.jpg diff --git a/static/imgs/ricingcomp2/flafy.png b/static/imgs/ricing_competitions/2/flafy.png similarity index 100% rename from static/imgs/ricingcomp2/flafy.png rename to static/imgs/ricing_competitions/2/flafy.png diff --git a/static/imgs/wall_of_fame-home-thumbnails/readme.md b/static/imgs/ricing_competitions/readme.md similarity index 61% rename from static/imgs/wall_of_fame-home-thumbnails/readme.md rename to static/imgs/ricing_competitions/readme.md index b2a6ca6..0359bc8 100755 --- a/static/imgs/wall_of_fame-home-thumbnails/readme.md +++ b/static/imgs/ricing_competitions/readme.md @@ -1,6 +1,4 @@ -The images here a displayed on the homepage. - -For their effect to work, they need a blurred version, which gets generated on build or manually. +For the effect of the images to work, they need a blurred version, which gets generated on build or manually. This is to prevent lag especially on mobile by removing the need for the CSS blur filter. `magick convert -gaussian-blur 0x20 -modulate 100,300,100 /home/vdawg/Downloads/tmp/a/img4.webp /home/vdawg/Downloads/tmp/a/img4_xx.webp`