https://en.wikipedia.org/wiki/JPEG#Discrete_cosine_transform
It is recommended to use a web server (Apache2) to host the files locally and access them.
Failure to do so will result in the following browser error:
Access to Image at 'file:///var/www/html/image-compression/sample.jpg' from origin 'null' has been blocked by CORS policy: Invalid response. Origin 'null' is therefore not allowed access.