Incorporating images is painful in apps.notion.lol
incorporate https://github.com/willnorris/imageproxy to manage images or https://github.com/imgproxy/imgproxy
look at the NGINX config at the bottom of the page
this uses this library https://github.com/nodeca/pica (?) and https://github.com/nodeca/image-blob-reduce and https://github.com/trekhleb/js-image-carver