🍱 frontend/assets: Add image generation script and assets for multiple projects

- Created script `generate_images.nu` to automate WebP/JPEG-XL conversions with low-res placeholders.
- Added new source image `data_hub_1.png`.
- Generated WebP and JPEG-XL assets for projects: carplexity, data_hub, endolingual, icons, parva, and tiles.
- Created both high-quality and low-resolution variants for all project assets.
This commit is contained in:
Markus Scully 2025-08-02 11:23:23 +03:00
parent d2affdf265
commit 1c8722912b
Signed by: mascully
GPG key ID: 93CA5814B698101C
34 changed files with 28 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 266 KiB

View file

@ -0,0 +1,28 @@
#!/usr/bin/env nu
# Generate low-res placeholders and high-res WebP and JPEG-XL versions of images
let images = (ls ...(glob *.{png,jpg,jpeg}) | get name)
mkdir webp
mkdir jxl
for image in $images {
let base = ($image | path parse | get stem)
let ext = ($image | path parse | get extension)
print $"Generating high-res WebP for ($image)"
magick $image -quality 85 $"webp/($base).webp"
print $"Generating high-res JPEG-XL for ($image)"
magick $image -quality 85 $"jxl/($base).jxl"
# Resize to 300px width, quality 20
print $"Generating low-res placeholder for ($image)"
magick $image -resize 300 -quality 20 $"webp/($base)_low.webp"
print $"Generating low-res JPEG-XL placeholder for ($image)"
magick $image -resize 300 -quality 20 $"jxl/($base)_low.jxl"
}
print "Generation complete. Check crates/frontend/assets/webp and crates/frontend/assets/jxl for new files."

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 648 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 718 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1,006 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 284 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 814 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 274 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 818 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 258 B