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

Php stream for images inside html not working

Solved by Tom View solution

Started by Tom 8 years ago · 1 replies · 729 views
8 years ago

Hi guys,
I am brand new to grav and by no means a coder, or developer of any kind. Simply a lowly user trying to make a site for his mate.

Anyway as I am using a template from the rocket theme site called anacron and as part of its default setup I noticed a lot of html is still used within the content areas instead of markdown.
I am in the process of adding content (and wanting to display images) and have hit a snag.

I can not simply attach an image tot he page and insert it in the page (within html code) as the markdown is ignored. And upon inspecting some of rocket themes own code I noticed they use the traditional img call but with php streaming it seems

TXT
< img src=" gantry-media://rocketlauncher/features/features-overview/feature-01.jpg" alt="image" />

This is displayed within spans and divs and works fine. So I attempt something similar with
< img src=" user://images/site/trucks/homepic1.png" alt="Pallet Stacking" style="float: left;" />

and tried using the image php stream
< img src=" image://site/trucks/homepic1.png" alt="Pallet Stacking" style="float: left;" />

I have taken out the style also, but on each occassion the image link is broken on the website.

(PS ignore the spaces in the html code, new poster limitations).

Any thoughts at all ?

8 years ago Solution

So, after some chatting to w00fz what is happening is that the typical user:// or image:// php stream is being overwritten (I think) by gantry and so gantry-media:// looks in the user/images/ folder (amongst others).

TLDR if using gantry use gantry-media:// instead of image:// .

👍 1

Suggested topics

Topic Participants Replies Views Activity
General · by Hanns Mattes, 12 hours ago
1 14 4 hours ago
General · by Andy Miller, 4 hours ago
0 11 4 hours ago
General · by Jerry Hunt, 5 days ago
2 137 1 day ago
General · by pamtbaau, 2 days ago
1 94 2 days ago
General · by Andy Miller, 2 days ago
0 78 2 days ago