{{-- Client-side image compressor. Automatically shrinks large images in the browser BEFORE any form is submitted, so big source photos (often several MB) upload small and store small. Runs on every form that contains an holding image files — e.g. the Course Builder blocks and the bulk Course Images uploader. - Only touches image/* files (PDFs, JSON, video inputs are left alone). - Resizes down to a max edge and re-encodes (WebP where supported, else JPEG / PNG), keeping the original if compression wouldn't actually make it smaller. - Opt out on a specific form with data-no-compress="1". --}}