Skip to content

paskal/blog

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

terrty.net blog source Publish Status

This blog is proxied by the nginx configuration in paskal/terrty.

YouTube thumbnails

YouTube's thumbnails with play button generated by this service. Example original thumbnails URLs:

https://img.youtube.com/vi/SFIEA_sAPhc/maxresdefault.jpg
https://img.youtube.com/vi/SFIEA_sAPhc/hqdefault.jpg

Images in avif

In order to make copies of images in a modern format to serve alongside with usual ones:

find ./static/images -type f -name '*.png' -exec sh -c 'avifenc --min 10 --max 30 $1 "${1%.png}.avif"' _ {} \;

Easier alternative than harden-than-I-thought task of getting avifenc working is converting images to avif using https://avif.io/.

Reduce PNG and JPG image size before publishing

It's easy to reduce the images size without altering their content:

find . -type f -iname "*.png" -exec optipng -o7 -preserve {} \;
find . -type f -iname "*.png" -exec advpng -z4 {} \;
find . -type f \( -iname "*.jpg" -o -iname "*.jpeg" \) -exec jpegoptim --strip-none {} \;