PDF Export: permalink Image not exported #3437

Closed
opened 2026-02-05 06:43:07 +03:00 by OVERLORD · 3 comments
Owner

Originally created by @main-sonn on GitHub (Jan 9, 2023).

Describe the Bug

An image is uploaded as attachment and inserted/linked on a page (e.g. https://bookstack.example/attachments/20200)
The image is displayed correctly on the page, but in the exported pdf it says "Image not found or type unknown".

Steps to Reproduce

  1. Export --> PDF
  2. pdf file: images with permalink URL --> "Image not found or type unknown"

Expected Behaviour

all images should be exported to the pdf: permalink images https://bookstack.example/attachments/20200 and https://bookstack.example/uploads/images/gallery/2022-12/example-image-eua3djve.png

Screenshots or Additional Context

No response

Browser Details

No response

Exact BookStack Version

v22.11

PHP Version

No response

Hosting Environment

Ubuntu 22.04

Originally created by @main-sonn on GitHub (Jan 9, 2023). ### Describe the Bug An image is uploaded as attachment and inserted/linked on a page (e.g. https://bookstack.example/attachments/20200) The image is displayed correctly on the page, but in the exported pdf it says "Image not found or type unknown". ### Steps to Reproduce 1. Export --> PDF 2. pdf file: images with permalink URL --> "Image not found or type unknown" ### Expected Behaviour all images should be exported to the pdf: permalink images https://bookstack.example/attachments/20200 and https://bookstack.example/uploads/images/gallery/2022-12/example-image-eua3djve.png ### Screenshots or Additional Context _No response_ ### Browser Details _No response_ ### Exact BookStack Version v22.11 ### PHP Version _No response_ ### Hosting Environment Ubuntu 22.04
OVERLORD added the 🐛 Bug label 2026-02-05 06:43:07 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Jan 10, 2023):

Hi @me-sp,
Images with PDFs are specifically handled to embed the data for creation.
We don't target attachment link-based images for this at all since it's generally not expected that attachments are used for in-content images, and I'm skeptical in thinking it'd be worthwhile to expand the system to support attachment images.

Can I ask why you are using attachments as in-content images rather than normal uploaded content images?

@ssddanbrown commented on GitHub (Jan 10, 2023): Hi @me-sp, Images with PDFs are specifically handled to embed the data for creation. We don't target attachment link-based images for this at all since it's generally not expected that attachments are used for in-content images, and I'm skeptical in thinking it'd be worthwhile to expand the system to support attachment images. Can I ask why you are using attachments as in-content images rather than normal uploaded content images?
Author
Owner

@main-sonn commented on GitHub (Jan 11, 2023):

Hi @ssddanbrown,

we have imported html files from our old wiki with the bookstack api. Many images are used multiple times per page.

First we tried to integrate the images inline into the HTML (before importing them via bookstack api). Unfortunately, the same images were then uploaded to Boostack several times, so we uploaded the images as an attachment and linked them.

@main-sonn commented on GitHub (Jan 11, 2023): Hi @ssddanbrown, we have imported html files from our old wiki with the bookstack api. Many images are used multiple times per page. First we tried to integrate the images inline into the HTML (before importing them via bookstack api). Unfortunately, the same images were then uploaded to Boostack several times, so we uploaded the images as an attachment and linked them.
Author
Owner

@ssddanbrown commented on GitHub (Jan 26, 2023):

Okay, thanks for the info. I don't see it really being worth us implementing specific functionality to suit what is a workaround for another limitation, our focus should instead be on adding proper image APIs so the initial limitation does not exist. Therefore I'm going to close this off.

Just an idea, although it's not ideal at all, you could push the unique images inline then fetch back out the page to get the image URLs to re-use. Of course, us adding proper image APIs would be the actual alternative.

@ssddanbrown commented on GitHub (Jan 26, 2023): Okay, thanks for the info. I don't see it really being worth us implementing specific functionality to suit what is a workaround for another limitation, our focus should instead be on adding proper image APIs so the initial limitation does not exist. Therefore I'm going to close this off. Just an idea, although it's not ideal at all, you could push the unique images inline then fetch back out the page to get the image URLs to re-use. Of course, us adding proper image APIs would be the actual alternative.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#3437