Pardon if this is a repost. I searched but could not find a solution. I have a page created for a project of mine. It is located in user/pages/05.project/photographs-of-saint-john/default.md
in this folder I have another folder containing images with a sub folder for /thumbs/ and /full/ which are for the projects thumbnails and full size images.
Now if i link to a thumbnail file directly for example :
That’s interesting. Something is definitely up there. It’s related to this ‘fallback’ functionality we have when a Grav route is not found.
Basically URLs in the user folder are a routed as pages first. Then if that page is not found, we make an attempt to see if you were trying to reference a file that exists. I will look at this logic to see if anything is amiss that could be causing this problem you are seeing.
An alternative would be to setup a directory at the root of grav that would not be routed, for example /project-images and just reference those images directly with via /project-images/project-x/image-1.jpg
However, what you are trying to do is not ideal. The better solution would be to put the images in the folder directly with the page. Then you could use Grav’s media capabilities to dynamically create the thumbnail as needed.
Unless you have some good reason not to use Grav’s built in image hand ling, I stronglysuggest doing so as it will automatically route to the image without any pathing needed, and gives you complete control over manipulating that image without the need of pre-processing it manually.
FYI, if you were to drop an image called “image-x.jpg” into the your user/pages/05.project/photographs-of-saint-john/ folder, from your page you could access it directly and resize it to a thumbnail like this: