HACKER Q&A
📣 DrNosferatu

Can AVIFs replace JPEGs inside PDF files?


Many news and magazine subscriptions use PDFs to distribute their content. The images are usually of JPEG quality. I assume this is so because the ancient JPEG is the underlying, embedded image compression format. (I believe above some version of PDF, JPEG2000 can be used too - but in my examples I see no evidence of its less blocky compression abilities in use)

Hence: Is it possible to use AVIF images inside PDF files, for better picture quality and better bandwidth use?

Thanks for your answers!


  👤 navjack27 Accepted Answer ✓
They could have been using webp and had the same benefits but they haven't. Like you said they could have been using jpeg 2000 correctly but they haven't. I doubt we will see avif be used this way correctly especially considering how in flux it is right now. I've messed around with avif on https://squoosh.app/ and it's not really as easy as just picking a number between 0 and 100 universally for every image and having it be better than jpeg.