question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support imagesdir

See original GitHub issue

Steps to reproduce:

  • Have a simple Asciidoc file with :imagesdir: ./images
  • Add an image in the images/ subdirectory.
  • Include the image from the AsciiDoc file, e.g. image::myimage.png[My Image]

Expected results:

  • Image gets picked up by the Confluence Publisher from images/myimage.png
  • No error message about the image.

Actual results:

  • Image is not picked up, it doesn’t show in the Confluence page.
  • There is an error message while publishing:
Exception in thread "main" java.lang.RuntimeException: Could not find attachment 
	at org.sahli.asciidoc.confluence.publisher.client.ConfluencePublisher.fileInputStream(ConfluencePublisher.java:195)
	at org.sahli.asciidoc.confluence.publisher.client.ConfluencePublisher.addOrUpdateAttachment(ConfluencePublisher.java:159)
	at org.sahli.asciidoc.confluence.publisher.client.ConfluencePublisher.lambda$addAttachments$7(ConfluencePublisher.java:144)
	at java.util.HashMap.forEach(HashMap.java:1289)
	at org.sahli.asciidoc.confluence.publisher.client.ConfluencePublisher.addAttachments(ConfluencePublisher.java:144)
	at org.sahli.asciidoc.confluence.publisher.client.ConfluencePublisher.lambda$startPublishingUnderAncestorId$0(ConfluencePublisher.java:82)
	at java.util.ArrayList.forEach(ArrayList.java:1255)
	at org.sahli.asciidoc.confluence.publisher.client.ConfluencePublisher.startPublishingUnderAncestorId(ConfluencePublisher.java:77)
	at org.sahli.asciidoc.confluence.publisher.client.ConfluencePublisher.publish(ConfluencePublisher.java:70)
	at org.sahli.asciidoc.confluence.publisher.cli.AsciidocConfluencePublisherCommandLineClient.main(AsciidocConfluencePublisherCommandLineClient.java:70)
Caused by: java.io.FileNotFoundException: /tmp/confluence-publisher3122701931061118065/assets/92190f5d2abd7f24e065a5c4632d557b7503363da1bef7d9532a24162e9dbdcb/myimage.png (No such file or directory)
	at java.io.FileInputStream.open0(Native Method)
	at java.io.FileInputStream.open(FileInputStream.java:195)
	at java.io.FileInputStream.<init>(FileInputStream.java:138)
	at org.sahli.asciidoc.confluence.publisher.client.ConfluencePublisher.fileInputStream(ConfluencePublisher.java:193)
	... 9 more

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:1
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
proudmancommented, Jul 1, 2022

Any updates?

0reactions
vovtzcommented, Nov 8, 2021

Currently, the Confluence Publisher internally sets the imagesdir attribute relative to the AsciiDoc source file processed, so that referenced images can be resolved. This is due to the way the Confluence Publisher currently handles the individual AsciiDoc sources. The documentation on https://confluence-publisher.atlassian.net/wiki/spaces/CPD/pages/315883521/Images mentions that the path to images needs to be relative to the referencing AsciiDoc source file. In the current version, setting the imagesdir attribute is not supported.

Would it perhaps be possible to resolve the imagesdir attribute first and then match the resulting image paths against the directories with AsciiDoc files and thus build lists of images belonging to documents?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Support imagesDir in plugin configuration · Issue #190
You manage the path to the images catalog (imagesdir) in each directory that contains AsciiDoc source files. (In other words, where am I...
Read more >
Image Paths and Formats
Image paths can be relative to the imagesdir or absolute. ... Image formats; Support for additional image file formats; Fonts in SVG images....
Read more >
Images Directory and Files
The source files for images are stored in an images family directory. Antora supports the PNG, JPG, SVG, and GIF (static and animated)...
Read more >
ContrastBrightnessIntensityCom...
Support for 12 and 16-bit grayscale and 48 and 64-bit color images is available only ... Jpeg, 24); } static class LEAD_VARS {...
Read more >
Sitefinity CMS 3.x and older versions: ImagesDir Property
Documentation about Sitefinity CMS 3.x and older versions: ImagesDir Property in . Get the help you need online.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found