doesn’t work. Nor do any of the page.media things I’ve tried.
I’d like to put all images in hi-res in one folder (per category), and then have Grav resize (and hopefully cache?) them for every page. (So I don’t have to manually resize anything).
Thank you @dimitrilongo !
Images are not yet showing up, but the “some text” in the below example does show up.
I put the images in user/pages/01.pagename/images - so the code below should be correct?
It’s a modular page actually, I copied all images to several folders, because I’m not really sure where I should put them for page.media to work?
I’ve got images in :
/user/pages/01.pagename/
/user/pages/01.pagename/images
/user/pages/01.pagename/_modulename/
/user/pages/01.pagename/_modulename/images
Still no images are showing up…
When I log in to the Admin Panel, they DO show up as images under Page Media… (I’m guessing these are the images in this folder - /user/pages/01.pagename/_modulename/ )
and the URL it spit out was the correct one for most images, but “null” for some others.
After some more tweaking I’ve found the problem:
As soon as I save the PNG images to JPG, dimitrilongo’s code solution is working perfectly fine.