https://discuss.asciidoctor.org/Diagrams-referenced-by-URL-in-PDF-tp4623p4627.html
Thomas,
As you know, PDF is a self-contained format, so all resources must be embedded into it at build time. The HTML works because HTML can just link to the asset. So, yes, the PDF generator needs to download these resources from the internet.
Asciidoctor supports automatically downloading resources from the internet to embed them into the document. However, this feature is "hidden" behind a security flag. You need to enable the allow-uri-read attribute from the CLI or API.
$ asciidoctor-pdf -a allow-uri-read document.adoc
To avoid slowing down the build, you can enable the (very primitive) URI cache.
$ gem install open-uri-cached
Then you can enable the URI cache:
$ asciidoctor-pdf -a allow-uri-read -a cache-uri document.adoc
The cache is stored in /tmp/open-uri-{uid}.
Cheers,
-Dan