There should be a hash present in the images from Github.
As for uploaded images and for github images as well, it should be possible to check the integrity of the file using:
xz -t image.img.xz
xz -t is way too slow (5 minutes on a 1.3 GB file). Instead, xz -l faults if the file has been cut off. This is so fast that it can be done as part of the listing of local files.
There should be a hash present in the images from Github. As for uploaded images and for github images as well, it should be possible to check the integrity of the file using:
xz -t image.img.xz