.
8
scripts/generate-blurred-images.sh
Executable file
|
@ -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
|
Before Width: | Height: | Size: 1.7 MiB After Width: | Height: | Size: 1.7 MiB |
Before Width: | Height: | Size: 2.4 MiB After Width: | Height: | Size: 2.4 MiB |
Before Width: | Height: | Size: 817 KiB After Width: | Height: | Size: 817 KiB |
Before Width: | Height: | Size: 607 KiB After Width: | Height: | Size: 607 KiB |
Before Width: | Height: | Size: 3.1 MiB After Width: | Height: | Size: 3.1 MiB |
Before Width: | Height: | Size: 629 KiB After Width: | Height: | Size: 629 KiB |
Before Width: | Height: | Size: 642 KiB After Width: | Height: | Size: 642 KiB |
Before Width: | Height: | Size: 1.2 MiB After Width: | Height: | Size: 1.2 MiB |
|
@ -1,6 +1,4 @@
|
||||||
The images here a displayed on the homepage.
|
For the effect of the images to work, they need a blurred version, which gets generated on build or manually.
|
||||||
|
|
||||||
For their effect 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.
|
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`
|
`magick convert -gaussian-blur 0x20 -modulate 100,300,100 /home/vdawg/Downloads/tmp/a/img4.webp /home/vdawg/Downloads/tmp/a/img4_xx.webp`
|