Inserting images into markdown

When you insert and image into the markdown of a page content from the editor, either by dragging/dropping or via the plus icon on the hover menu. Is it possible for the inserted markdown code, e.g. !(alt text)[image.jpg "image title"), to be read from an existing .meta.yaml file if present.

Not without coding, which I am guessing is off the table.

The best approach would be to customise your Twig template (so further down the pipeline) so that it pulls this information from your .meta.yaml file and adds it as a title attribute.

Yeah that is a bit beyond me but thanks for the direction. Maybe when I have spent more time with Grav I will investigate

I did something like this for Blog image headers, where you could provide some image credit text and even a link to be overlaid with the image, in my Open Bootstrap 4 theme - sample Twig grav-theme-bootstrap4-open-matter/blog_item.html.twig at master · hibbitts-design/grav-theme-bootstrap4-open-matter · GitHub and live sample image Week 4 (May 30 - Jun 5) | CPT-363

I am sure (LOL) that the twig could be improved but perhaps this might give you a few useful ideas etc.

1 Like

Thanks Paul I will take a look

1 Like