BookStack icon indicating copy to clipboard operation
BookStack copied to clipboard

Relative paths for local images

Open jelle82 opened this issue 7 years ago • 11 comments

Make the paths to locally stored images relative instead of absolute. For example <img src="/uploads/images/gallery/cat.png" /> instead of <img src="http://bookstack.example.com/uploads/images/gallery/cat.png" />,

It increases portability. f you want to change the domain name for the Bookstack App there is no need to change all the image urls afterwards.

jelle82 avatar Nov 21 '18 08:11 jelle82

That would be very helpfull!

Sibbo07 avatar Nov 21 '18 08:11 Sibbo07

This would be nice but will make the logic more complex. Was a while ago but I think i decided to use full paths since we'd have to handle full paths anyway for external storage systems (S3). Easier to standardise on one format.

ssddanbrown avatar Nov 22 '18 12:11 ssddanbrown

Would it make sense in that case to have a "base domain" field in the Settings page? I believe Wordpress has a similar approach.

andreicocari avatar Jan 15 '19 20:01 andreicocari

@andreicocari Yeah, Although we essentially already have this via APP_URL in the .env file.

ssddanbrown avatar Jan 15 '19 20:01 ssddanbrown

+1 for this!

recklessnl avatar Mar 05 '19 08:03 recklessnl

+1 for this, it's needed for environments where the internal and external URLs are different.

comnam90 avatar Mar 13 '19 21:03 comnam90

+1 too ^^ I face the same issue using a temporary url to create content and modifying the url when staging to production environment with final url, all the images are not displayed any more, they are referring to the old url in use when uploaded.

GarethFox avatar Mar 25 '19 03:03 GarethFox

+1 Have the same issue after migrating to another domain.

antontkv avatar May 19 '19 06:05 antontkv

any update on this issues?

Stefansen avatar Jun 28 '24 09:06 Stefansen