Using Images Saved in File Manager

https://tourma.great-site.net/?i=1

So, this is more of a general question on how InfinityFree’s File Manager works.

Can I store items in folders within htdocs and still have them load? And if so, how do I write that? Like, to call up the index it’s ‘/Index.htm’, but when I try ‘/Images/Image.png’ to get an image I saved in a folder called “Images” within htdocs, I get a broken image icon.

Am I doing something wrong?

Also, is there a hard path I can call? Like https://tourma.great-site.net/Images/Image.png

Thanks,

If the images are in the htdocs folder you simply reference them as “/image.jpg”

This isn’t specific to infinity free. The htdocs folder is simply the root of your website

Or you can use an absolute link like “https://tourma.great-site.net/Image.png

5 Likes

nods

I’m mainly asking if I can store them in folders to keep the htdocs only html files, and if so, how to call them. I really like deeply nested folder trees.

Worst comes to worst, I’ll shove everything in the root.

Thanks.

1 Like

Sure

A file located at /htdocs/path/to/file.ext can be loaded at domain.tld/path/to/file.ext

Also, I highly recommend you don’t capitalize the first letter in a file name, it’s just not good practice.

7 Likes

Oh. I figured out what I was doing wrong. I was working in Notepad++ and that doesn’t have access to my internal links.

Derp.

Problem solved.

I will try to not capitalize everything, but that’s gonna be hard to fight. Mastodon has me CamelCasing and all that.

Thanks everyone.

1 Like

in an <img> link the first / is your htdocs folder

a folder within htdocs lets call it htdocs/myphotos/
would become /myphotos/ like the following

<img src='/myphotos/mountain.jpg'>

5 Likes

Just try lowerCamelCase instead of UpperCamelCase :slight_smile:

4 Likes

I tend to use lower-case-with-hyphens myself but it doesn’t matter if you use UPPER lower camelCase oRaNYthinGYOuLike as long as it matches it’ll work

5 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.