If you insert a web image to a page whose url contains the text download/attachments (such as this image http://confluence.atlassian.com/download/attachments/139467/confluence-3-0-profile-view.png?version=2&modificationDate=1243658607572), and then export that page as pdf, the image will not resolve, and you will get a warning in the logs
The pdf exports continue, but where the image should've been, is instead an empty space.
Environment
Confluence 6.13.0
Confluence 6.15.3
Steps to Reproduce
- Upload an image file to a page
- Navigate to the Attachments view of the page such as the URL below:
- Open the image uploaded from Step 1 in a new tab and the URL should look something like below:
- Create a new page and insert a new image via the "Insert files and images"(CTRL+M) > Images from the web
- Enter the image URL from above step and Publish the page
- Verify the image can be seen in the View Page Mode
- Export the page to PDF
Expected Results
The page is exported to PDF successfully with the image in the exported PDF file.
Actual Results
The page is exported successfully to a PDF File but the image with the "download/attachments" URL is not included in the PDF
In the atlassian-confluence.log, this warning message is being logged:
2019-06-12 09:37:39,211 WARN [http-nio-26130-exec-2] [confluence.extra.flyingpdf.ConfluenceExportUserAgent] getImageResource Could not retrieve image resource http: -- url: /c6130/spaces/flyingpdf/pdfpageexport.action | page: 65608 | traceId: 8c42641476275a1b | userName: admin | referer: http:
The more "download/attachments" image links in the page, PDF Export of the page will take significantly longer time to complete.
Workarounds:
- If the image is from Confluence, insert the image directly from the page using Confluence's file tools, rather than linking to the image URL. This will also have the added benefit of keeping the image updated if a new version of the image is ever uploaded:
- Click the "Insert Files and Images" button on the toolbar.
- Select "Search on other pages" in the dialogue sidebar.
- Enter the page you'd like to insert the image from in the search bar, then click Search.
- Select the images you'd like to insert.
- Click Insert.
- The page should now export successfully with the images.
- If the image is from an external site, add the problematic image as an attachment first, and then replace the web image with the attachment on the page before exporting.