I have tried it without the hyphen and it makes no difference. Interestingly, when I enable markdown extra and try it with their syntax:
{#somephotoid}
or
{.somephotoclass}
I get the same behavior: classes work, id's don't.
I was looking at some of the source code. In ParsedownGravTrait.php, in the function 'inlineImage', if I dump the variable '$excerpt' near the beginning, after the first if-else block (say line 205), I get the following:
array:2 [▼
"extent" => 60
"element" => array:2 [▼
"name" => "img"
"attributes" => array:5 [▼
"src" => "/grav-site/about-me/ArtistPhoto2.jpg"
"alt" => "Indrani Choudhury"
"title" => null
"id" => "indr"
"class" => "indrani-photo"
]
]
]
It remains the same until on line 267 there is the following call:
---php
$excerpt['element'] = $medium->parseDownElement($title, $alt, $class, true);
After that $excerpt looks like this:
array:2 [▼
"extent" => 60
"element" => array:2 [▼
"name" => "img"
"attributes" => array:3 [▼
"alt" => "Indrani Choudhury"
"class" => "indrani-photo"
"src" => "/grav-site/user/pages/02.about-me/ArtistPhoto2.jpg"
]
]
]
This seems to be where the id is being lost. It is not being passed along. Am I missing something?