GetPublii / Publii

The most intuitive Static Site CMS designed for SEO-optimized and privacy-focused websites.
https://getpublii.com
GNU General Public License v3.0
6.06k stars 407 forks source link

[Bug]: failure to convert local URLs to remote #1250

Closed atomGit closed 8 months ago

atomGit commented 9 months ago

Operating system

manjaro

Publii version

0.43.0 build 16368

Post editor

WYSIWYG editor (not sure it matters)

Bug description

adding a single, non-captioned image using tinymce results in something like the following:

<p><img class="post__image" src="file:////home/user/Documents/Publii/sites/examplecom/input/media/files/img.jpg" alt="" width="100" height="100"></p>

and upon syncing the url is converted to the domain as expected

adding the exact same code manually works also (the url is converted on sync) however if the image location is changed when adding the html, the url is not changed to the domain upon sync (it remains file:////...)

Steps to reproduce

as above

Relevant log output

No response

dziudek commented 8 months ago

Hi,

Such URLs are working only for the media directory - if your relative path does not contain path to the media directory it won't be resolved to the domain during sync.

atomGit commented 8 months ago

why you dismiss this issue as wontfix (as you did with so many others)?

please explain how it is expected behavior to convert urls to files in /media/files to the domain, but to not do the same for images added from other folders?

this makes no sense

at least copy images from other sources to /media/files, or offer to do so