Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Support

Images in non-Grav section of site

Solved by Dennis View solution

Started by Dennis 6 years ago · 6 replies · 496 views
6 years ago

I have a site that is powered with Grav. I made a new, simple webpage that is not associated with Grav, it's a very simple page that did not need to be associated with the rest of my website. I put the new page in a subfolder in my root directory. When I surf there, it works fine, but the images do not load. I think Grav is somehow preventing them from loading. When I surf to the URL that is specifically for the image file, I get my Page Does Not Exist message from Grav. How can I prevent this?

6 years ago

It would be easier to debug if you gave us the address, or at least some more details about where are the images located, and do you use relative or full URLs in your page 🙂

6 years ago

Did you try to put absolute path? RN it's looking for image in /grav/user/pages/proof/img/tees/filename.jpg
You sure that is the correct path?

6 years ago

@dennis, I did the following:

  • Created a fresh install of Grav 1.6.23 in my localhost
  • Created folder '/proof' in root of Grav folder
  • Copied html content of http://asbvaldosta.com/proof, styles.css and scripts.js into my local files.
  • Added a dummy image and renamed it '2000_white_font.jpg'
  • Folder structure is now:
    TXT
    ./proof
    ├── css
    │   └── styles.css
    ├── img
    │   └── tees
    │       └── 2000_white_front.jpg
    ├── index.html
    └── js
      └── scripts.js
    
  • Browsed to http://localhost/grav/site-dev/proof/
  • Result:
    image|468x452

If this is not what you wanted to see, what is?

👍 1
6 years ago Solution

You didn't have to go through that trouble, but it is definitely appreciated! It helped me know that the problem was just something I was overlooking. I was assuming there was some characteristic of Grav that was hijacking the URL. How? I dunno.

I was able to track down the issue! It's case sensitivity! My image file names have capital letters in them. There is no problem when running on my local host, but when I visit the page live on the remote server, case makes a difference.

Again, thanks for the response!

Suggested topics

Topic Participants Replies Views Activity
Support · by Thomas, 1 week ago
2 51 8 hours ago
Support · by Anna, 2 days ago
2 58 10 hours ago
Support · by Justin Young, 11 hours ago
1 30 11 hours ago
Support · by Duc , 1 week ago
2 63 5 days ago
Support · by Colin Hume, 1 week ago
2 55 5 days ago