Download
We're evolving to serve you better! This current forum has transitioned to read-only mode. For new discussions, support, and engagement, we've moved to GitHub Discussions.

Change Image / Media Folder from “root/media/…” to “assets/img/…”

  • #9128
    Avatar photo[anonymous]

    Hello all!
    I’m very new to Publii. I’ve found it very interesting and quite enjoyable with creating Blog Posts.
    I however seem to have run into a small, possibly fixable issue.

    Going through all of the settings available through the Publii program, I cannot find a way to change the media directory. I’m using “Manual Upload” as my server type, as I use an external hosting service that I import my content into and the only thing that doesn’t seem to be up to par is the media / images as they’re being redirected to a different directory than what my external hosting provider is requiring.

    My hosting provider requires my images to be in “example.com/assets/img/”; while Publii automatically exports images to “example.com/media/posts/…”. Which I have no issue with the files being under a subfolder called “Posts”, I just would like to define the folder prior and call it to “Assets” instead of “Media”.

    If this is changeable, and I’m just being blind. Please help me out a bit with this small issue.
    If this is not changeable, then I can go without posting images for the time being.

    But I would love the feedback from the community, as this is my first time using Publii.

    #9166
    Avatar photo[anonymous]

    Hi,

    Unfortunately – this path currently is not editable and I afraid that it can be hard to change to a dynamic path, as media directory is quite often used by other Publii functions and plugins.

    #9167
    Avatar photo[anonymous]

    I will check if it is possible to add such feature in the future Publii releases.

    #9191
    Avatar photo[anonymous]

    I appreciate your response! I don’t mind that it’s not changeable (I’ll use VSCode to change the directories), I was just wondering if there was a way. If it happens or not, I’ll still be using Publii.

    #9194
    Avatar photo[anonymous]

    I will try to make it editable, because your case suggest that some hosting companies uses this directory as a restricted catalog 🙂