We need to extend https://github.com/cirosantilli/linux-kernel-module-cheat/blob/564735fbfcc60f73703f141adfeb24bea9104442/asciidoctor/link-target-up.rb to also work on images basically.
It is not just a direct copy paste because images are not inline I believe. Likely it will be a copy paste of https://github.com/cirosantilli/linux-kernel-module-cheat/blob/564735fbfcc60f73703f141adfeb24bea9104442/asciidoctor/extract-link-targets instead.
I can't be bothered right now because we currently only have one single image in the document, the X11 one!