This commit is contained in:
Christofer 2023-08-29 20:34:53 +04:00
parent 4617a8de8b
commit 4905987232
10 changed files with 9 additions and 3 deletions

View 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

View file

Before

Width:  |  Height:  |  Size: 1.7 MiB

After

Width:  |  Height:  |  Size: 1.7 MiB

View file

Before

Width:  |  Height:  |  Size: 2.4 MiB

After

Width:  |  Height:  |  Size: 2.4 MiB

View file

Before

Width:  |  Height:  |  Size: 817 KiB

After

Width:  |  Height:  |  Size: 817 KiB

View file

Before

Width:  |  Height:  |  Size: 607 KiB

After

Width:  |  Height:  |  Size: 607 KiB

View file

Before

Width:  |  Height:  |  Size: 3.1 MiB

After

Width:  |  Height:  |  Size: 3.1 MiB

View file

Before

Width:  |  Height:  |  Size: 629 KiB

After

Width:  |  Height:  |  Size: 629 KiB

View file

Before

Width:  |  Height:  |  Size: 642 KiB

After

Width:  |  Height:  |  Size: 642 KiB

View file

Before

Width:  |  Height:  |  Size: 1.2 MiB

After

Width:  |  Height:  |  Size: 1.2 MiB

View file

@ -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`