Does image file compression affect different size images (or ratios) differently? For example, the difference in clarity between the small images and the large backgrounds on sites. And is AVIF any good?
Yes John Personally I face this issue when I compress image the pixels not clear.
yes, image file compression works different based on the image size (resolution). It works on a (somewhat) logarithmic scale. Meaning if you take a really low res image (320x240) and reduce the size by 20%, it will look like garbage. Maybe even unusable. If you reduce a 3840x2160 image by 20%, it may not even be noticeable.
In general the more pixels you have to work with, the more optimization you can do before the human eye notices it. In most cases.